public void TestFormat() { //setup NuWayOrderForm form = new NuWayOrderForm(); //check Assert.IsTrue(form.format("").Length == 0, "if(length>0) failed."); Assert.IsTrue(form.format("1") == "1.00", "if(conains(.) failed."); Assert.AreEqual(form.format("1."), "1.00", "add two 0's failed."); Assert.AreEqual(form.format("1.1"), "1.10", "add one 0 failed."); Assert.AreEqual(form.format("1.00"), "1.00", "not formatting failed"); }