This is a fairly simple question regarding unit testing.
I have a way, for example. GetOrderDetails, which calls the repository to receive order information. I have a false repository that can be configured to return responses to stocks.
To test the GetOrderDetails method, at least I will use the following cases -
Repository call error
- with error code
- with the exception
Successful repository call
- returns zero result
- returned one result
- returns more than one result
Do I have to write one testing method for testing the above scenarios or should it be a separate testing method for each of the above scenarios?
, , ,
1.
2.
3. , . , ..
?