I have following unit test and to calculate shipping cost ,I have a Calculate method that will return double value and am checking against hard coded value (1566.66666666667) and the test is failing. Can anyone guide me if this is the correct way
of unit testing double values?
[TestMethod] public void calculate_Test() { //Shipping class and calculate method var amount=Shipping.Calculate(value1,value2,value3); Assert.AreEqual(1566.66666666667, amount); }