Test method is inconclusive: Test wasn't run. Error?
asp.net-mvc, asp.net-mvc-4, c#, resharper, unit-testing
Solution
It was a Resharper issue. In Resharper options->Tools->MSTEST, I unchecked the Use Legacy Runner and now it works.
Problem
I have a test class and below I have posted a sample test from the test class ``` namespace AdminPortal.Tests.Controller_Test.Customer { [TestClass] public class BusinessUnitControllerTests { private IBusinessUnitRepository _mockBusinessUnitRepository; private BusinessUnitController _controller; [TestInitialize] public void TestInitialize() { _mockBusinessUnitRepository = MockRepository.GenerateMock<IBusinessUnitRepository>(); _controller = new BusinessUnitController(_mockBusinessUnitRepository); } [TestCleanup] public void TestCleanup() { _mockBusinessUnitRepository = null; _controller.Dispose(); _controller = null; } #region Index Action Tests [TestMethod] public void Index_Action_Calls_GetAllBusinessUnit() { _mockBusinessUnitRepository.Stub(x => x.GetAllBusinessUnit()); _controller.Index(); _mockBusinessUnitRepository.AssertWasCalled(x=>x.GetAllBusinessUnit()); } } } ``` When I run the project I get following screen I checked the references and the test project has the reference to main project. Any idea why the test are not running or saying that they were inconclusive? Edit 1: I saw a post here and changed my test's setting's default processor architecture to X64 but it still doesn't work.
Related problems
- An exception occurred while invoking executor 'executor://mstestadapter/v1': Object reference not set to an instance of an object
- the source file is different from when the module was built
- Resharper 7: MSTest not working - "Test wasn't run"
- How to diagnose Resharper Unit Test Runner "Unable to load one or more of the requested types" error