public void CalculateTest_Hsinchu() { Hsinchu target = new Hsinchu() { ShipProduct = new Product { IsNeedCool = true, Name = "test1", Size = new getSize { Height = 10, Length = 30, Width = 20 }, Weight = 10 } }; target.Calculate(); var expectedName = "Hsinchu"; var expectedFee = 254.16; var actualName = target.GetsCompanyName(); var actualFee = target.GetsFee(); Assert.AreEqual(expectedName, actualName); Assert.AreEqual(expectedFee, actualFee); }
public void GetsFeeTest_Hsinchu() { Hsinchu target = new Hsinchu(); double expected = 0F; Assert.AreEqual(expected, target.GetsFee()); }
public void CalculateTest() { Hsinchu target = new Hsinchu() { ShipProduct = new Product { IsNeedCool = true, Name = "商品測試1", Size = new Size { Height = 10, Length = 30, Width = 20 }, Weight = 10 } }; //act target.Calculate(); //assert var expectedName = "新竹貨運"; var expectedFee = 254.16; var actualName = target.GetsComapanyName(); var actualFee = target.GetsFee(); //assert Assert.AreEqual(expectedName, actualName); Assert.AreEqual(expectedFee, actualFee); }
public void GetsFeeTest() { Hsinchu target = new Hsinchu(); double expected = 0F; double actual; actual = target.GetsFee(); Assert.AreEqual(expected, actual); }