25 lines
731 B
YAML
25 lines
731 B
YAML
namespace TestProject1
|
|
{
|
|
public class Tests
|
|
{
|
|
private MyMath _myMath;
|
|
|
|
[SetUp]
|
|
public void Setup()
|
|
{
|
|
_myMath = new MyMath();
|
|
}
|
|
|
|
[TestCase(100000.0, 10.1, 100010.1)]
|
|
[TestCase(-100000.0, -10.1, -100010.1)]
|
|
[TestCase(0.0, 0.0, 0.0)]
|
|
[Description("Verifies that the MyMath.Add() function works correctly with real numbers.")]
|
|
public void MyMath_Add_RealNumber(double number1, double number2, double expected)
|
|
{
|
|
// Act
|
|
double result = _myMath.Add(number1, number2);
|
|
// Assert
|
|
Assert.That(expected, Is.EqualTo(result), $"Not Correct: ({number1}) + ({number2})");
|
|
}
|
|
}
|
|
} |