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 }
public void MultMethodThrowsExceptionWithZero() { Arithmatic NumTestObject = new Arithmatic(); Assert.Throws <ArgumentException>(() => NumTestObject.MultNumber(0, 5)); // Does the method throw the correct exception when given incorrect input }