public async Task ConfirmViewMessage_DisplaysTheCorrectViewWhenRetrievingAMessageAndItDoesExist() { // Arrange messageService.Setup(e => e.MessageExists(testKey)).ReturnsAsync(true); // Act var result = await controller.ConfirmViewMessage(testKey); // Assert var actualResult = result as ViewResult; Assert.AreEqual("ConfirmViewMessage", actualResult.ViewName); Assert.AreEqual(true, actualResult.ViewData["MessageExists"]); messageService.VerifyAll(); }