Exemplo n.º 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();
        }
Exemplo n.º 2
0
        private ActionResult PageHandlerResult()
        {
            webAppContext.SetupCanonicalUrlEventHandler();

            return(new EmptyResult());
        }