public void ShouldReturn404StatusWhenLoanIdNotExists()
		{
			var fakeRepository = new Mock<IRepository>();

			var sut = new LoanApplicationSearchController(fakeRepository.Object);

			sut.WithCallTo(x => x.ApplicationStatus(99)).ShouldGiveHttpStatus(HttpStatusCode.NotFound);
		}
 public void ShouldRenderApplicationWhenIdExists()
 {
     const string fakeName = "Phill";
     var fakeRepo = new Mock<IRepository>();
     fakeRepo.Setup(f => f.Find(99)).Returns(new LoanApplication() {FirstName = fakeName });
     var sut = new LoanApplicationSearchController(fakeRepo.Object);
     sut.WithCallTo(x => x.ApplicationStatus(99))
         .ShouldRenderDefaultView()
         .WithModel<LoanApplication>(la => la.FirstName == fakeName);
 }
		public void ShouldRenderApplicationWhenIdExists()
		{
			var fakeRepository = new Mock<IRepository>();

			fakeRepository.Setup(x => x.Find(99))
				.Returns(new LoanApplication { FirstName = "Larry" });

			var sut = new LoanApplicationSearchController(fakeRepository.Object);

			sut.WithCallTo(x => x.ApplicationStatus(99))
				.ShouldRenderDefaultView()
				.WithModel<LoanApplication>(x => x.FirstName == "Larry");
		}