0

I'm wokring on C# program, VS2015, R#, Nunit. I have Nunit tests

    [ Test ]
    [ TestCaseSource( typeof( GeneralTestCases ), "TestStoresCredentials" ) ]
    public void PingSoapAsync_IncorrectUrl_ThrowException( ServiceSoapCredentials credentials )

and

    [ Test ]
    [ TestCaseSource( typeof( GeneralTestCases ), "TestStoresCredentials" ) ]
    public void PingSoapAsync_IncorrectApiUser_ThrowException( ServiceSoapCredentials credentials )

GeneralTestCases is (there are 5 cases!!!):

public class GeneralTestCases
{
    /// <summary>
    /// GetTestStoresCredentials shoud return the same credentials as this method
    /// </summary>
    /// <returns></returns>
    public IEnumerable TestStoresCredentials
    {
        get
        {
            yield return new TestCaseData(new BaseTest.MServiceSoapCredentials()).SetName("m1-9-2-0-ce");
            yield return new TestCaseData(new BaseTest.MServiceSoapCredentials()).SetName("m1-9-2-1-ce");
            yield return new TestCaseData(new BaseTest.MServiceSoapCredentials() ).SetName("m1-9-2-2-ce");
            yield return new TestCaseData(new BaseTest.MServiceSoapCredentials() ).SetName("m2-0-2-0-ce");
            yield return new TestCaseData(new BaseTest.MServiceSoapCredentials() ).SetName("m1-8-1-0-ce");
        }


    }
}

but when i press "Run All Tests" not all cases used by Resharper test runner:

enter image description here

What i'm doing wrong?

Maxim Kitsenko
  • 2,042
  • 1
  • 20
  • 43

1 Answers1

0

This problem can be related to your tests runner. Try to close current test sessions and start tests from scratch.R#-> Unit Tests -> Run Unit Tests