public void Contact_ModelIsValid_VerifyUserMessage() { _sut.BindViewModel(_model); var result = _sut.Contact(_model); var resultAsViewResult = (Microsoft.AspNetCore.Mvc.ViewResult)result; Assert.Equal("Mail Sent", resultAsViewResult.ViewData["UserMessage"]); }