2014-06-12 11:23:41
1. Arrange
Do what is necessary to set up the test.
Here we will
2. Act
Execute the test.
We
3. Assert
Check and verify the returned result.
Example
using System; usingMicrosoft.VisualStudio.TestTools.UnitTesting; using MyProject; namespace UnitTest {[TestClass] public class UnitTest {[TestMethod] public void TestMethod() {//Arrange test var obj = new myClass(); var aValue = "test"; Boolean result;//Act test result = obj.myMethod(aValue);//Assert test Assert.AreEqual(true, result); } } }