Skip to content

Incorrect error message #75

@nakov

Description

@nakov

In the .NET Core Project Test strategy in the judge, when we create a unit test class, holding more than 1 test methods, we get an error message:

Failing tests not captured properly, please contact an administrator

This error message, should be improved, to help the users fix the problem easier, e.g.

Failing tests not captured properly, please contact an administrator. Each unit test should have exactly one [Test] method. Do you have multiple test methods in a single class?

This is the line of code, which displays this incorrect message:

throw new ArgumentException("Failing tests not captured properly, please contact an administrator");

This is an example test class, which causes the problem:

using NUnit.Framework;


namespace Tests
{
    class TestClass
    {
        [Test]
        public void FirstTest()
        {
            Assert.Pass();
        }

        [Test]
        public void SecondTest()
        {
            Assert.Pass();
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions