public async Task ReceiveEmailAsync_ShouldReturnCorrectResponse() { var configuration = Configuration.InitConfiguration(); var sendgridApiKey = configuration["Sendgrid:ApiKey"]; var options = new SendGridClientOptions(); options.ApiKey = sendgridApiKey; var sendGridClient = new SendGridClient(options.ApiKey); var sendGridService = new SendGridService(sendGridClient); var email = GlobalConstants.ApplicationEmail; var name = "Name"; var subject = "subject"; var content = "Some content"; var response = await sendGridService.ReceiveEmailAsync(email, name, subject, content); Assert.True(response.StatusCode.ToString() == "Accepted", ErrorMessage); }