Exemple #1
0
        public void CelsiusToFahrenheit100()
        {
            double fahrenheit = 0.0;

            Ex3bCalculations.CelsiusToFahrenheit(100, out fahrenheit);
            Assert.AreEqual(212.0, Math.Round(fahrenheit, 1));
        }
Exemple #2
0
        public void CalcFutureValue_Ref_12Mo100US()
        {
            decimal futureValue = 0m;

            Ex3bCalculations.CalculateFutureValue(100m, 0.004m, 12, ref futureValue);
            Assert.AreEqual(1231.66m, Decimal.Round(futureValue, 2));
        }
Exemple #3
0
        public void CalcFutureValue_Ref_120Mo20US()
        {
            decimal futureValue = 0m;

            Ex3bCalculations.CalculateFutureValue(20m, 0.003m, 120, ref futureValue);
            Assert.AreEqual(2892.37m, Decimal.Round(futureValue, 2));
        }
Exemple #4
0
        public void GetDiscountPercent_Out_Low()
        {
            decimal discountPercent = 0m;

            Ex3bCalculations.GetDiscountPercent(499m, out discountPercent);
            Assert.AreEqual(0.1m, discountPercent);
        }
Exemple #5
0
        public void GetDiscountPercent_Out_High()
        {
            decimal discountPercent = 0m;

            Ex3bCalculations.GetDiscountPercent(500m, out discountPercent);
            Assert.AreEqual(0.2m, discountPercent);
        }
        public void CalcFutureValue_120Mo20US()

        {
            Assert.AreEqual(2892.37m,

                            Decimal.Round(Ex3bCalculations.CalculateFutureValue(20m, 0.003m, 120), 2));
        }
        public void FahrenheitToCelsius212()

        {
            Assert.AreEqual(100.0,

                            Math.Round(Ex3bCalculations.FahrenheitToCelsius(212.0), 1));
        }
        public void CalcFutureValue_12Mo100US()

        {
            Assert.AreEqual(1231.66m,

                            Decimal.Round(Ex3bCalculations.CalculateFutureValue(100m, 0.004m, 12), 2));
        }
        public void GrossPay_String_10()

        {
            Assert.AreEqual(100m,

                            Decimal.Round(Ex3bCalculations.GrossPay("1.1 2.2 3.3 3.4 ", 10m), 2));
        }
        public void TotalHours()

        {
            Assert.AreEqual(10m,

                            Decimal.Round(Ex3bCalculations.TotalHours("1.1 2.2 3.3 3.4 "), 2));
        }
        public void GrossPay_50_10()

        {
            Assert.AreEqual(550m,

                            Decimal.Round(Ex3bCalculations.GrossPay(50m, 10m), 2));
        }
Exemple #12
0
        public void CelsiusToFahrenheit0()
        {
            double fahrenheit = 0.0;

            Ex3bCalculations.CelsiusToFahrenheit(0, ref fahrenheit);
            Assert.AreEqual(32.0, Math.Round(fahrenheit, 1));
        }
Exemple #13
0
 public void GetDiscountPercent_High()
 {
     Assert.AreEqual(0.2m, Ex3bCalculations.GetDiscountPercent(500m));
 }
Exemple #14
0
 public void GetDiscountPercent_Low()
 {
     Assert.AreEqual(0.1m, Ex3bCalculations.GetDiscountPercent(499m));
 }