public async Task Email_module_post_email_validation_failed() { //Arrange var email = new models.Email(); //Act var res = await client.PostAsync("/Email", new StringContent(JsonConvert.SerializeObject(email), Encoding.UTF8, ApplicationJson)); //Assert Assert.Equal(HttpStatusCode.UnprocessableEntity, res.StatusCode); }
public async Task Email_module_post_email_validation_Ok() { //Arrange var email = new models.Email() { From = "*****@*****.**", To = new string[] { "*****@*****.**" } }; //Act var res = await client.PostAsync("/Email", new StringContent(JsonConvert.SerializeObject(email), Encoding.UTF8, ApplicationJson)); //Assert Assert.Equal(HttpStatusCode.OK, res.StatusCode); }