From 4be136a8b4a5264176aca72e0bf170efc90e43a8 Mon Sep 17 00:00:00 2001 From: sburman Date: Fri, 24 Nov 2023 23:36:18 +0530 Subject: [PATCH] Update SendgridEmailClientTests.cs --- tests/SendGrid.Tests/SendgridEmailClientTests.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/SendGrid.Tests/SendgridEmailClientTests.cs b/tests/SendGrid.Tests/SendgridEmailClientTests.cs index f4466737a..828b1c6a9 100644 --- a/tests/SendGrid.Tests/SendgridEmailClientTests.cs +++ b/tests/SendGrid.Tests/SendgridEmailClientTests.cs @@ -1,6 +1,7 @@ namespace SendGrid.Tests { using System; + using System.Threading.Tasks; using SendGrid.Helpers.Mail; using Xunit; @@ -35,10 +36,19 @@ public void TestClientOptionsSetViaSendgridClient() var sg = new SendGridClient(options); Assert.Equal("https://api.eu.sendgrid.com/", options.Host); Console.WriteLine("HERE"); - Console.WriteLine(sg); + Console.WriteLine(sg.UrlPath); //Assert.Equal("https://api.eu.sendgrid.com/", sg.UrlPath); } + [Fact] + public void TestErrorClientOptions() + { + var options = new SendGridClientOptions(); + Assert.Throws(() => options.SetDataResidency("")); + Assert.Throws(() => options.SetDataResidency(null)); + + } + } }