Example #1
0
        public void If_the_input_only_one_string_is_null_result_equal_to_exeption()
        {
            var calculator = new LajtiStringCalculator();

            Assert.Throws <InvalidOperationException>(() => calculator.Add("1,"));
        }
Example #2
0
        public void If_Add_more_than_two_number_which_separated_by_coma_the_result_equal_to_exeption()
        {
            var calculator = new LajtiStringCalculator();

            Assert.Throws <InvalidOperationException>(() => calculator.Add("1,2,3"));
        }
Example #3
0
        public void If_the_input_string_contains_two_invalid_caracter_stacks_separated_by_coma_the_result_equal_to_exeption()
        {
            var calculator = new LajtiStringCalculator();

            Assert.Throws <InvalidOperationException>(() => calculator.Add("23,dsadf"));
        }
Example #4
0
        public void If_Add_two_number_which_separated_by_coma_the_result_is_the_sum_of_the_two_number()
        {
            var calculator = new LajtiStringCalculator();

            Assert.That(calculator.Add("1,2"), Is.EqualTo(3));
        }