Пример #1
0
        public void GetNotationValue_DecimalToBinary_WithWrongOutputNotation()
        {
            string           inputNotation  = "Десятичная";
            int              inputValue     = 2;
            string           outputNotation = "Двная";
            INotationService service        = new NotationService();

            string result = service.GetNotationValue(inputNotation, inputValue.ToString(), outputNotation);

            Assert.IsTrue(String.IsNullOrEmpty(result));
        }
Пример #2
0
        public void GetNotationValue_DecimalToBinary()
        {
            string           inputNotation  = "Десятичная";
            int              inputValue     = 2;
            string           outputNotation = "Двоичная";
            string           outputResult   = "10";
            INotationService service        = new NotationService();

            string result = service.GetNotationValue(inputNotation, inputValue.ToString(), outputNotation);

            Assert.IsFalse(String.IsNullOrEmpty(result));
            Assert.AreEqual(outputResult, result);
        }