예제 #1
0
        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();
        }
예제 #2
0
        private ActionResult PageHandlerResult()
        {
            webAppContext.SetupCanonicalUrlEventHandler();

            return(new EmptyResult());
        }