Hello Remco.
It is a very simple console application test project. I Used Visual Studio 2010, Target Framework is 4.0 Client Profile (Default)
Tried 3.5 framework, no change.
There is black dots next to the lines in all 3 files.
Program.cs:
Code:
using System;
namespace nCrunchTest
{
class Program
{
static void Main(string[] args)
{
int x = MyClass.add(10, 20);
}
}
}
MyClass.cs:
Code:
using System;
namespace nCrunchTest
{
public class MyClass
{
public static int add(int a, int b)
{
return a + b;
}
}
}
TestClass.cs
Code:
using NUnit.Framework;
namespace nCrunchTest
{
[TestFixture]
public class TestClass
{
[TestCase]
public void addTest()
{
int a = 5;
int b = 7;
int expected = 13;
int result = MyClass.add(a, b);
Assert.That(result,Is.EqualTo(expected));
}
}
}
As you can see i have told the test to fail.
In the 'NCrunch Tests' windows the test is marked as passed.
When i run nUnit it fails as expected.
If i change the expected value to 12, NCrunch still show 'passed' in 'NCrunch Tests' windows, but not nUnit passes also.
In the Task Manager i can see the NCrunch.TaskRunner40.x86.exe does use CPU when i change the code.
The NCrunch Processing Queue show 'Build Assembly' Complete.
p.s.Never had the change before to play with unit testing, unfortunately never had the change to be allowed the time at work ;-( So it might simply be a stupid newbie error with nUnit :)