SaiBand
SaiBand

Reputation: 5355

Mocking classes in Rhino Mocks

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 when 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

Upvotes: 0

Views: 166

Answers (1)

Bob The Janitor
Bob The Janitor

Reputation: 20792

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

Upvotes: 1

Related Questions