There is a test task:
Given the file type
operand1;operand2;operation;result operand1;operand2;operation;result operand1;operand2;operation;result operand1;operand2;operation;resultEach line describes an arithmetic operation.
operand1 and operand2 - operands, integers
operation - arithmetic operation + - / *
result is the result of the operation on operand1 and operand2
The file may contain any field values.
Is required
- Implement unit (JUnit) arithmetic tests.
- Each action should appear in the report as a separate test script.
End of task
I understand how to write JUnit tests, but I do not understand what exactly is being tested in this case.
Do I think correctly that you first need to write code that parses the variables, 4 functions for different arithmetic operations, and then check with JUnit the correctness of the functions based on the test equalities in the file?
I ask you to express your understanding of the problem.