public void Can_Not_Register_Without_Valid_Email()
{
//Arrange
User model = new User
{
Email = "test",
Password = "12"
};
// Act
accountController.ModelState.AddModelError("error", "Email must end with @capgemini.com");
ActionResult res = accountController.Register(model);
// Assert
Assert.IsInstanceOf(typeof(ViewResult), res);
Assert.IsFalse(((ViewResult)res).ViewData.ModelState.IsValid);
}