Beispiel #1
0
        public void AddString_String_Contains_Newline()
        {
            var controller = new StringAdditionController();
            var response   = controller.Add("1\n2,3");

            Assert.Equal(6, response);
        }
Beispiel #2
0
        public void AddString_Contains_Single_Element(string inputString, int outputValue)
        {
            var controller = new StringAdditionController();
            var response   = controller.Add(inputString);

            Assert.Equal(outputValue, response);
        }
Beispiel #3
0
        public void AddString_MoreThan1Number()
        {
            var controller = new StringAdditionController();
            var response   = controller.Add("1,2");

            Assert.Equal(3, response);
        }
Beispiel #4
0
        public void AddString_Empty_String()
        {
            var controller = new StringAdditionController();
            var response   = controller.Add("");

            Assert.Equal(0, response);
        }