Exemple #1
0
        public void HasLessThanThreeDecimalPlaces_ZeroPointOneOneOne_ReturnsFalse_AsDoSubsequentValuesAfterDivindingBySevenInALoopOfTen()
        {
            decimal input   = 0.111m;
            decimal divisor = 7;
            CashTransactionFileIOService ctfios = new CashTransactionFileIOService();

            for (int i = 0; i < 10; ++i)
            {
                if (i > 0)
                {
                    input /= divisor;
                }
                Assert.IsFalse(ctfios.HasLessThanThreeDecimalPlaces(input));
            }
        }
Exemple #2
0
        public void HasLessThanThreeDecimalPlaces_OnePointSixNine_ReturnsTrue()
        {
            CashTransactionFileIOService ctfios = new CashTransactionFileIOService();

            Assert.IsTrue(ctfios.HasLessThanThreeDecimalPlaces(1.69m));
        }
Exemple #3
0
        public void HasLessThanThreeDecimalPlaces_OnePointFourFiveThree_ReturnsFalse()
        {
            CashTransactionFileIOService ctfios = new CashTransactionFileIOService();

            Assert.IsFalse(ctfios.HasLessThanThreeDecimalPlaces(1.453m));
        }
Exemple #4
0
        public void HasLessThanThreeDecimalPlaces_Zero_ReturnsTrue()
        {
            CashTransactionFileIOService ctfios = new CashTransactionFileIOService();

            Assert.IsTrue(ctfios.HasLessThanThreeDecimalPlaces(0m));
        }