Details() public method

public Details ( string hashTag ) : System.Web.Mvc.ActionResult
hashTag string
return System.Web.Mvc.ActionResult
        public void Details_WithInvalidHashTag_Should_ReturnHttpNotFoundResult()
        {
            var conferenceController = new ConferenceController(_context);

            var result = conferenceController.Details("thisisinvalid")
                .As<HttpNotFoundResult>();
        }
        public void Details_WithValidHashTag_Should_ReturnCorrectConference()
        {
            var stubConference = new Conference() { HashTag = "abcde", Name = "test", Abstract = "test", StartDate = DateTime.Now, EndDate = DateTime.Now, TimeZoneId = "test", AvailableToPublic = true };
            _context.Conferences.Add(stubConference);
            _context.Conferences.Add(new Conference() { HashTag = "test", Name = "test", Abstract = "test", StartDate = DateTime.Now, EndDate = DateTime.Now, TimeZoneId = "test", AvailableToPublic = false });
            _context.SaveChangesWithErrors(); ;

            var conferenceController = new ConferenceController(_context);
            conferenceController.ControllerContext = TestHelper.MockContext(conferenceController, "TestUser");

            var result = conferenceController.Details("abcde")
                .As<ViewResult>();

            result.Model
                .As<Conference>()
                .Should()
                .Be(stubConference);
        }