So I have a dilema with what is the best approach in this scenario. I am writing a Unit Test which looks something like this:
void testCorrectAxeParse()
{
// Arrange
InputData in = m_inputData;
Parser p = m_Parser;
in.setAxe(idata::Axes::AX_LEFT);
// Act
OutData out = p.parse(in);
// Assert
AssertEquals(in.getAxe(), out.getAxe());
}
Now I have 4 values in the idata::Axes
array.
Is it ok to write a for each
statement in order to test every value or should I write 4 tests, one for each value in the enum?
I have read online that UT should be as small as possible, and I don't know if adding for loops is ok.