public void ExternalWebOpportunityDetails() { // Arrange OpportunityController controller = new OpportunityController(); // Act var opportunityId = 1; ViewResult result = controller.Details(opportunityId) as ViewResult; var model = (Opportunity)result.ViewData.Model; // Assert Assert.IsNotNull(result); Assert.AreEqual(opportunityId, model.OpportunityId); Assert.AreEqual("BREADALBANE CANOE CLUB EVENT", model.OpportunityTitle); }