public void IndexTest() { //Assign var fakeSetCanonicalUrlController = new SetCanonicalUrlController(fakeApplicationLogger, fakeWebAppContext); //Act var indexMethodCall = fakeSetCanonicalUrlController.WithCallTo(c => c.Index()); //Assert indexMethodCall.ShouldReturnEmptyResult(); A.CallTo(() => fakeWebAppContext.SetupCanonicalUrlEventHandler()).MustHaveHappened(); }
private ActionResult PageHandlerResult() { webAppContext.SetupCanonicalUrlEventHandler(); return(new EmptyResult()); }