Answer the question
In order to leave comments, you need to log in
Is there an analogue of TestCase from C# in Java?
To test some amount of data in C#, you can use the following TestCase
[TestCase(-24, 24)]
[TestCase(24, 24)]
[TestCase(0, 0)]
public void Calculate(double argument, double result)
{
var calculator = new Absolute();
var testResult = calculator.Calculate(argument);
Assert.AreEqual(result, testResult);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question