Game Development Reference
In-Depth Information
{
public class SimpleClass
{
private string _simpleProperty = “”;
public string SimpleProperty
{
get { return _simpleProperty; }
set { _simpleProperty = value; }
}
public void BrokenMethod()
{
throw new ApplicationException(“I am a faulty method! Fix me!”);
}
public void GoodMethod()
{
throw new NotImplementedException();
}
public static int AddTwoNumbers(int left, int right)
{
return left - right;
}
}
}
Now that we have a simple class to test against, we need to create the test fixture
that NUnit will use to coordinate the tests:
using System;
using NUnit.Framework;
namespace SimpleLibrary.UnitTesting
{
[TestFixture]
public class ExampleFixture
{
private SimpleLibrary.SimpleClass _simpleClass = null;
[SetUp]
public void SetUp()
Search Nedrilad ::




Custom Search