示例#1
0
文件: UnitTests.cs 项目: djvorr/SSE
        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");
        }