1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
[TestMethod]
public void TestMethod1()
{
Duration d = Age.GetAge(new DateTime(2012,09,24));
Assert.AreEqual(new Duration(0, 0, 27), d);
}
[TestMethod]
public void TestMethod2()
{
Duration d = Age.GetAge(new DateTime(2011, 09, 24));
Assert.AreEqual(new Duration(1, 0, 27), d);
}
[TestMethod]
public void TestMethod3()
{
Duration d = Age.GetAge(new DateTime(2012,09,20));
Assert.AreEqual(new Duration(0, 1, 1), d);
}
[TestMethod]
public void TestMethod4()
{
Duration d = Age.GetAge(new DateTime(2011, 09, 20));
Assert.AreEqual(new Duration(1, 1, 1), d);
} |
Partager