File tree Expand file tree Collapse file tree 4 files changed +33
-5
lines changed
test/SocketLabs.Tests/InjectionApi Expand file tree Collapse file tree 4 files changed +33
-5
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ PM> Install-Package SocketLabs.EmailDelivery
3636Adding a Package Reference to your project:
3737
3838```
39- <PackageReference Include="SocketLabs.EmailDelivery" Version="2.0.0 " />
39+ <PackageReference Include="SocketLabs.EmailDelivery" Version="2.0.1 " />
4040```
4141
4242.NET CLI users can also use the following command:
Original file line number Diff line number Diff line change 1- ## 2.0.0
1+ ## 2.0.1
22
33* Fix issue with ApiKey being unset for bearer type keys
44* Add explicit support for .NET 8.0 and .NET 9.0
Original file line number Diff line number Diff line change 1- ## 1.4.3
2- * Added MetadataOrTagsAreTooLarge error messsage
1+ ## 2.0.1
2+
3+ * Fix issue with ApiKey being unset for bearer type keys
4+ * Add explicit support for .NET 8.0 and .NET 9.0
5+ * Update dependencies
6+ * Implement nullable pattern
7+
8+ ``` note
9+ This is a breaking change. Some objects require constructor initialization now.
10+ ```
Original file line number Diff line number Diff line change 1- using Microsoft . VisualStudio . TestTools . UnitTesting ;
1+ using Microsoft . VisualStudio . TestPlatform . CommunicationUtilities ;
2+ using Microsoft . VisualStudio . TestTools . UnitTesting ;
3+ using Newtonsoft . Json . Linq ;
24using SocketLabs . InjectionApi ;
35using SocketLabs . InjectionApi . Message ;
46using System ;
@@ -34,5 +36,23 @@ public async Task SendAsyncTest()
3436 // The client should throw the same exception on subsequent calls.
3537 await Assert . ThrowsExceptionAsync < HttpRequestException > ( async ( ) => await client . SendAsync ( message , CancellationToken . None ) ) ;
3638 }
39+
40+
41+ [ TestMethod ( ) ]
42+ public async Task CanSendMessage ( )
43+ {
44+ var _client = new SocketLabsClient ( 42006 , "DcYYCkSQoV2exx8ksztt.UsImvR6ckr1_r32wC3KPWmd2D1Sz7PGfRx6fJPrg" )
45+ {
46+ NumberOfRetries = 3
47+ } ;
48+
49+ var message = new BasicMessage ( ) ;
50+ message . To . Add ( "matt.soler@socketlabs.com" ) ;
51+ message . From . Email = "do-reply@ai.socketlabs.email" ;
52+ message . Subject = "This is a test" ;
53+ message . HtmlBody = "<p>Hi!</p>" ;
54+
55+ var response = await _client . SendAsync ( message , CancellationToken . None ) ;
56+ }
3757 }
3858}
You can’t perform that action at this time.
0 commit comments