Пример #1
0
        public void CurrencyInputSubUnitTooLong()
        {
            List <string> input = new List <string>()
            {
                "0", "999"
            };

            CurrencyInputConsole testInput = new CurrencyInputConsole();

            testInput.ConvertInput(input);

            Assert.IsFalse(testInput.ConvertSubUnitSuccess);
        }
Пример #2
0
        public void CurrencyInputBaseUnitNegative()
        {
            List <string> input = new List <string>()
            {
                "-50", "999"
            };

            CurrencyInputConsole testInput = new CurrencyInputConsole();

            testInput.ConvertInput(input);

            Assert.IsFalse(testInput.ConvertSubUnitSuccess);
        }
Пример #3
0
        public void CurrencyInputLettersBase()
        {
            List <string> input = new List <string>()
            {
                "fefe32"
            };

            CurrencyInputConsole testInput = new CurrencyInputConsole();

            testInput.ConvertInput(input);

            Assert.IsFalse(testInput.ConvertBaseSuccess);
        }
Пример #4
0
        public void CurrencyInputBaseCorrect()
        {
            List <string> input = new List <string>()
            {
                "50"
            };

            CurrencyInputConsole testInput = new CurrencyInputConsole();

            testInput.ConvertInput(input);

            Assert.IsTrue(testInput.ConvertBaseSuccess);
        }
Пример #5
0
        public void CurrencyInputOneDecimalSubUnit()
        {
            List <string> input = new List <string>()
            {
                "0", "1"
            };

            CurrencyInputConsole testInput = new CurrencyInputConsole();

            testInput.ConvertInput(input);

            Assert.IsTrue(testInput.ConvertBaseSuccess);
            Assert.IsFalse(testInput.ConvertSubUnitSuccess);
        }
Пример #6
0
        public void CurrencyInputTooManyCoomas()
        {
            List <string> input = new List <string>()
            {
                "", "23", "35"
            };

            CurrencyInputConsole testInput = new CurrencyInputConsole();

            testInput.ConvertInput(input);

            Assert.IsFalse(testInput.ConvertBaseSuccess);
            Assert.IsFalse(testInput.ConvertSubUnitSuccess);
        }
Пример #7
0
        public void CurrencyInputBaseEmptyandSubCorrect()
        {
            List <string> input = new List <string>()
            {
                "", "23"
            };

            CurrencyInputConsole testInput = new CurrencyInputConsole();

            testInput.ConvertInput(input);

            Assert.IsFalse(testInput.ConvertBaseSuccess);
            Assert.IsTrue(testInput.ConvertSubUnitSuccess);
        }