public void ShouldRedirectToAcceptedViewOnSuccessfulApplication() { var sut = new HomeController(); var application = new Application { IsAccepted = true }; sut.WithCallTo(x => x.Index(application)).ShouldRedirectTo(x => x.Accepted); }
public void ShouldApplicationRenderWhenIdExists() { var fakeContext = new Mock<IApplicationRepository>(); fakeContext.Setup(x => x.Get(1)).Returns(new Application { Id = 1, Name = "A", IsAccepted = true }); var sut = new HomeController(fakeContext.Object); sut.WithCallTo(x => x.GetApplication(1)).ShouldRenderDefaultView().WithModel<Application>(x => x.Id == 1); }
public void ShouldRedirectToOnetOnAbout() { var sut = new HomeController(); sut.WithCallTo(x => x.About()).ShouldRedirectTo("http://onet.pl/"); }
public void ShouldRenderDefaultView() { var sut = new HomeController(); sut.WithCallTo(x => x.Index()).ShouldRenderDefaultView(); }