Why isn't this simple MSpec test giving results?

I have been using Mspec with FakeItEasy and I keep getting inconclusive test results. I've tried commenting out my fake setup code and even the actual call to the method under test. I am also unable to debug the test. I also just tried a simple test like this:

private Then it_should_be_true = () => true.ShouldBeTrue();

      

What is the reason for the inconclusive tests?

enter image description here

[Tags("IntegrationTest")]
[Subject(typeof(AuthManager))]
public class When_a_login_is_performed_using_valid_credentials
{
    protected static string MemberUsername;
    protected static string MemberPassword;
    protected static SignInResponse Response;

    private Given context = () =>
    {
        MemberUsername = "User1";
        MemberPassword = "Pass1";
    };

    private When test = () =>
    {
        Response = AuthManager.Current.SignIn(MemberUsername, MemberPassword);
    };

    private Then It_should_return_a_successful_response = () => Response.Success.ShouldBeTrue();
    private Then It_should_not_contain_any_reported_errors = () => Response.Errors.ShouldBeEmpty();
    private Then It_should_have_an_Id_populated = () => Response.Id.ShouldNotBeEmpty();
}

      

I wrapped it up to become Then to map the BDD syntax using the code below. He has always worked in the past.

using Machine.Specifications;

namespace Testing.MachineSpecifications
{
    /// <summary>
    /// Given
    /// </summary>
    [SetupDelegate]
    public delegate void Given();

    /// <summary>
    /// When
    /// </summary>
    [ActDelegate]
    public delegate void When();

    /// <summary>
    /// Then
    /// </summary>
    [AssertDelegate]
    public delegate void Then();
}

      

+3


source to share


1 answer


machine.specifications.runner.resharper runner was one version behind ReSharper. In the future, it might be a good idea to wait for a ReSharper update until the runner has time to catch up with compatibility.



+2


source







All Articles