Domanda

I have the following test code. But cant see the tests in either Test Explorer or Resharper. What am I missing? I have made the class public, I have tried cleaning the project, i have tried both default architectures in the test settings. I am running Windows 7. xUnit 1.9.2, Resharper 8.1 Full Edition

using Xunit;
namespace MonkeyFace.Specs.Registration
{
    public class ValidApplicationReceived
    {
        [Trait("A valid application is submitted","")]
        [Fact(DisplayName= "A user is added to the system")]
        public void User_is_Add_To_System()
        {
            Debug.Print("hi");
            Assert.Equal(1,1);
        }
È stato utile?

Soluzione

Do you have the xunit ReSharper runner extension installed? You need to install it from ReSharper -> Extension Manager.

If it's installed, do you see anything in the editor? Any icons next to the class or method to indicate tests?

Altri suggerimenti

I had to install the xUnit.net runner for Visual Studio 2012 and 2013 by using the Tools -> Extensions and Updates menu in Visual Studio

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top