Reputation: 59
Requirement: If any file has protection(Sensitivity label) then we are throwing an error message.
Before we go and do our actual implementation, I want to achieve this using TDD approach.
Please let me clarify whether the below steps can we achieve using unit test with C#?
Upvotes: 0
Views: 152
Reputation: 3660
I never used the MIP SDK, but you are in the wrong path if you want to test the file information using MIP.
1. Use double testing
First you will have to use Double Testing (a stub or a fake) to be sure that you business rules are applied correctly in your algorithme (throwing the exception if the sensitivity level is bad for example)
The stub or the fake will allow you to control the sensitivity level return, It's also means that you will have to wrap the "MIP Library" inside a class or using IOC
2. Use integration testing
When you will have a first working scenario with you unit test, you will be able to make the same with Integration Testing. You will add to your project the material to have a "production environnement" adding files with differents sentivities to your test project
Conclusion
Of course, I know that my answer is not a working solution but your needs is not simple and cannot be set in a stackoverflow post. You will need to investigate about double testing & integration testing before making any development if you want to have reliable unit tests.
Upvotes: 0