namespace Solution
{
public class MyCalculator
{
public int Add(int a, int b)
{
return a + b;
}
}
}
using NUnit.Framework;
using Solution;
namespace Tests
{
[TestFixture]
public class MyCalculatorTests
{
[Test]
public void Add_TwoNumbers_ReturnsSum()
{
// Arrange
MyCalculator calculator = new MyCalculator();
int a = 5;
int b = 7;
int expectedResult = 12;
// Act
int actualResult = calculator.Add(a, b);
// Assert
Assert.AreEqual(expectedResult, actualResult);
}
}
}