public void AdditionTestPos() // Test of addition method when positive decimal numbers are used { double result = Brain.Addition(1.545, 1.455); // Arrange // Act Assert.Equal(3, result); // Assert }
public void AdditionArrTestPos() // Test of addition method in an array when decimal numbers are used { double[] arrTestNumbers = { 1.545, 1.455 }; // Arrange double expected = 3; double result; result = Brain.Addition(arrTestNumbers); // Act Assert.Equal(expected, result, 4); // Assert }
public void AdditionTestAdv() // Test of addition method when positive/negative decimal numbers are used { double result = Brain.Addition(-0.6542, 658.32); Assert.Equal(657.6658, result, 4); }
public void AdditionTestNeg() // Test of addition method when negative decimal numbers are used { double result = Brain.Addition(-8.9331, -6.7633); Assert.Equal(-15.6964, result, 4); }