Lets say there is an Interface ICreateFileStrategy. Lets say there are classes A and B that implement these two interfaces. Both these classes implement method
long CreateFile(ExportFile exportFile)
Now w开发者_运维知识库hen I want to write a unit test I want to test method CreateFile of class A. How is this possible. How do I set the expectations exactly.
Thanks, Sai
for starters you test the class not the interface, so you just create an instance of Class A mock all of the dependencies and then test the method
精彩评论