public void Add_WhenCalled_ReturnTheSumOfArgument() { // Act var result = mathCalculator.Add(1, 2); // Assert Assert.AreEqual(3, result); }
public void VerifyAddMethodWorkingProperly() { var calculator = new MathCalculator(); var result = calculator.Add(10, 20); Assert.AreEqual(30, result); }
public void Test() { float x = 10; var mathCalculator = new MathCalculator(); var result = mathCalculator.Add(1, 2); }
public void Add_WhenCalled_ReturnsTheSumOfArguments() { // Act var result = mathCalculator.Add(1, 2); // Assert result.Should().Be(3); }
public void Add_OneIntOneNull_ReturnsZero() { var mathCalculator = new MathCalculator(); var zero = mathCalculator.Add(2, null); Assert.AreEqual(0, zero); }
// Method_Schenario_ExpectedBehaviour public void Add_TwoInts_ReturnsAdd() { // Arrange: Create objets var mathCalculator = new MathCalculator(); // Act: Call a method var seven = mathCalculator.Add(2, 5); // Aset: Verify result Assert.AreEqual(7, seven.Value); }