Nunit TestCaseSource пропускает некоторые случаи

Я работаю над программой C#, VS2015, R#, Nunit. У меня есть тесты Nunit

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

и

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

GeneralTestCases (есть 5 случаев!!!):

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");
        }


    }
}

но когда я нажимаю «Выполнить все тесты», не все случаи используются средством запуска тестов Resharper:

введите здесь описание изображения

Что я делаю неправильно?


person Maxim Kitsenko    schedule 01.08.2016    source источник
comment
Что произойдет, если вы запустите тесты с помощью самого NUnit?   -  person Charlie    schedule 01.08.2016


Ответы (1)


Эта проблема может быть связана с вашим тестировщиком. Попробуйте закрыть текущие сеансы тестирования и начать тестирование с нуля.R#-> Unit Tests -> Run Unit Tests

person Community    schedule 02.11.2016