I’ve been tasked to implement unit tests for a lot of modules in a firm and the only Problem I’ve encountered so far is for Methods where they have about 20 Input Variables and 15 Output variables. How do I even check for so many possibilities?
>Solution :
Well, i guess then method looks something like this:
public Output Process(T1 input1, ..., T20 input20) { ... }
where Output would be
public class Output
{
public OutputT1 Output1 { get; set; }
...
public OutputT15 Output15 { get; set; }
}
So your test method could look like this:
[Fact]
public void TestProcessing()
{
// Arrange
var input1 = new T1(); // set some appropriate data
...
var input20 = new T20(); // set some appropriate data
// Also set expected values
var actualOutput1 = new OutputT1();
...
var actualOutput15 = new OutputT15();
// Act
var output = _sut.Process(input1, ..., input20);
// Assert
Assert.Equals(output.Output1, actualOutput1);
...
Assert.Equals(output.Output15, actualOutput15);
}