KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
is it legal to MOQ a class that does not inherit an interface like so: var mockIActionService = new Mock<IActionService>(); var mockValidAgeRule = new Mock<ValidAgeRule>(mockIActionService.Object); I inject the IService into ValidAgeRule which is just a simple class with one method called "Excute". My question is how to I verify that has been called. Whenever I try: mockValidAgeRule.Verify(x => x.Execute(app)); //Where App is a valid object does anyone know how to do this?
Tags (comma-separated)
Save Edits
Cancel