コード例 #1
0
        public void TestDayPhaseSummary()
        {
            const int    previousMonthDay        = 2160;
            const int    currentMonthDay         = 2342;
            const double socialNormEqualTarif    = 3.41;
            const double socialNormNotEqualTarif = 6.59;
            const int    daySocialNorm           = 54;

            var serviceData = new ServiceCalc();
            var dayDelta    = serviceData
                              .CreateDelta(currentMonthDay, previousMonthDay);
            var actualResult = serviceData
                               .FindPhaseSummary(dayDelta, daySocialNorm, socialNormEqualTarif, socialNormNotEqualTarif);
            const double expectedResult = 1027.66;

            Assert.AreEqual(expectedResult, actualResult);
        }
コード例 #2
0
        public void TestNightPhaseSummary()
        {
            const int    previousMonthDay        = 1521;
            const int    currentMonthDay         = 1625;
            const double socialNormEqualTarif    = 1.67;
            const double socialNormNotEqualTarif = 3.44;
            const int    daySocialNorm           = 31;

            var serviceData = new ServiceCalc();

            var dayDelta = serviceData
                           .CreateDelta(currentMonthDay, previousMonthDay);

            var actualResult = serviceData
                               .FindPhaseSummary(dayDelta, daySocialNorm, socialNormEqualTarif, socialNormNotEqualTarif);
            const double expectedResult = 302.89;

            Assert.AreEqual(expectedResult, actualResult);
        }