N
N
Nikita Filatov2015-12-02 11:31:32
Java
Nikita Filatov, 2015-12-02 11:31:32

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);
        }

is there an analogue of TestCase in Java JUnit tests?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
4
4y4z, 2015-12-02
@M0NSTERC4T

https://github.com/junit-team/junit/wiki/Parameter... will it work ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question