Game Development Reference
In-Depth Information
{
_simpleClass = new SimpleLibrary.SimpleClass();
}
[TearDown]
public void TearDown()
{
_simpleClass = null;
}
[Test]
public void AddTwoNumbersTest()
{
int result = SimpleLibrary.SimpleClass.AddTwoNumbers(5, 7);
Assert.AreEqual(12, result);
}
[Test]
public void SimplePropertyTest()
{
Assert.AreEqual(“”, _simpleClass.SimpleProperty);
_simpleClass.SimpleProperty = “This is a test”;
Assert.AreEqual(“This is a test”, _simpleClass.SimpleProperty);
}
[Test]
public void ExplicitFailureTest()
{
_simpleClass.BrokenMethod();
}
[Test, Ignore(“This is a deprecated test”)]
public void DeprecatedTest()
{
_simpleClass.GoodMethod();
}
[Test, ExpectedException(typeof(NotImplementedException))]
public void GoodMethodTest()
{
_simpleClass.GoodMethod();
}
}
}
Search Nedrilad ::




Custom Search