Example #1
0
        [TestMethod()]         // F to C
        public void Zero_FahrenheitToCelciusTest()
        {
            float       fahrenheit = -459.67f;
            float       expected   = -273.15f;
            TempConvert convert    = new TempConvert();
            float       actual     = float.Parse(convert.FahrenheitToCelcius(fahrenheit).ToString("n2"));

            Assert.AreEqual(expected, actual);
        }
Example #2
0
        [TestMethod()]         // F to C
        public void Boiling_FahrenheitToCelciusTest()
        {
            float       fahrenheit = 212.00f;
            float       expected   = 100.00f;
            TempConvert convert    = new TempConvert();
            float       actual     = float.Parse(convert.FahrenheitToCelcius(fahrenheit).ToString("n2"));

            Assert.AreEqual(expected, actual);
        }
Example #3
0
 public float FahrenheitToCelcius(float temp)
 {
     return(TempConvert.FahrenheitToCelcius(temp));
 }