Beispiel #1
0
        public void AddToListCreatesItems()
        {
            Arithmatic NumTestObject = new Arithmatic();

            NumTestObject.NumList.Add(NumTestObject.MultNumber(3, 5));
            NumTestObject.NumList.Add(NumTestObject.MultNumber(12, 5));
            NumTestObject.NumList.Add(NumTestObject.AddNumber(7, 4));
            NumTestObject.NumList.Add(NumTestObject.AddNumber(6, 9));

            Assert.Equal(4, NumTestObject.NumList.Count); // Are items added to the list correctly
        }
Beispiel #2
0
        public void AddMethodReturnsSum()
        {
            Arithmatic NumTestObject = new Arithmatic();

            int result = NumTestObject.AddNumber(3, 45);

            Assert.Equal(48, result); // Does the method add the parameters given correctly
        }