Tag Info

Hot answers tagged

2

Can any one explain Assert.AreEqual(true, true) Verifies that two specified objects are equal. The assertion fails if the objects are not equal. Displays a message if the assertion fails. example and explanation? Very simple NUnit test: using System; using NUnit.Framework; namespace SampleUnitTest { [TestFixture] public Class SampleTest { ...


2

You can use Assertions to verify something is in a certain state. Normally you compare the actual against the excepted state. Example usage: Do some steps in your application Gather the value of a field Assert that the value is indeed the value you expect Assert.AreEqual(Actual, Expected) This could give an assertion failure if Actual and Expected ...


1

In NUnit 2.4.4, there is a new feature - the Suite Attribute that allows you to return an array of tests as opposed to using the TestSuite class in previous versions. To add tests, it would look something like this: [Suite] public static IEnumerable Suite { get { ArrayList suite = new ArrayList(); suite.Add(new AddAll()); return ...


1

Although I have never used them, it seems Unity released their own set of testing tools. See their introduction blogpost: http://blogs.unity3d.com/2013/12/18/unity-test-tools-released/ See their examples: http://blogs.unity3d.com/2014/05/21/unit-testing-part-1-unit-tests-by-the-book/ Get it from the Asset store: ...



Only top voted, non community-wiki answers of a minimum length are eligible