Skip to content

Commit c5f73f6

Browse files
committed
Coderabbit comments fix
1 parent 1c7b1ea commit c5f73f6

File tree

6 files changed

+8
-10
lines changed

6 files changed

+8
-10
lines changed

docs/cookbook/batch-send-email.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ catch (HttpRequestException hrex)
268268
{
269269
// handle HTTP errors
270270
}
271-
catch (OperationCancelledException ocex)
271+
catch (OperationCanceledException ocex)
272272
{
273273
// handle cancellation
274274
}
@@ -294,7 +294,7 @@ var response = await batchEmailClient.Send(request);
294294
> [!TIP]
295295
> @Mailtrap.IMailtrapClient.BatchTransactional, @Mailtrap.IMailtrapClient.BatchBulk and @Mailtrap.IMailtrapClient.BatchTest(System.Int64)
296296
> are factory methods that will create new @Mailtrap.Emails.IBatchEmailClient instance every time when called.
297-
> Thus in case when you need to perform multiple `BatchSend()` calls to the same endpoint it will be good idea
297+
> Thus in case when you need to perform multiple `Send()` calls to the same endpoint it will be good idea
298298
> to spawn client once and then reuse it:
299299
> ```csharp
300300
> IBatchEmailClient batchEmailClient = _mailtrapClient.BatchBulk(); // Caching client instance
@@ -306,4 +306,4 @@ var response = await batchEmailClient.Send(request);
306306
>```
307307
308308
## See also
309-
More examples available [here](https://github.com/railsware/mailtrap-dotnet/tree/main/examples).
309+
More examples available [Mailtrap .NET examples on GitHub](https://github.com/railsware/mailtrap-dotnet/tree/main/examples).

docs/cookbook/send-email.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ catch (HttpRequestException hrex)
297297
{
298298
// handle HTTP errors
299299
}
300-
catch (OperationCancelledException ocex)
300+
catch (OperationCanceledException ocex)
301301
{
302302
// handle cancellation
303303
}

src/Mailtrap.Abstractions/Emails/Requests/EmailRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public record EmailRequest : IValidatable
159159
/// </value>
160160
///
161161
/// <remarks>
162-
/// If provided, then <see cref="Subject"/>, <see cref="Category"/>, <see cref="TextBody"/> and <see cref="HtmlBody"/>
162+
/// If provided, then <see cref="Subject"/>, <see cref="TextBody"/> and <see cref="HtmlBody"/>
163163
/// properties are forbidden and must be <see langword="null"/>.<br />
164164
/// Email subject, text and html will be generated from template using optional <see cref="TemplateVariables"/>.
165165
/// </remarks>

src/Mailtrap/Emails/Requests/BatchEmailRequestBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static class BatchEmailRequestBuilder
2525
/// Updated <see cref="BatchEmailRequest"/> instance so subsequent calls can be chained.
2626
/// </returns>
2727
///
28-
/// <exception cref="ArgumentNullException" id="ArgumentNullException">
28+
/// <exception cref="ArgumentNullException">
2929
/// When <paramref name="batchRequest"/> or <paramref name="requests"/> is <see langword="null"/>.
3030
/// </exception>
3131
///

tests/Mailtrap.UnitTests/Emails/Requests/BatchEmailRequestTests.Validator.Requests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public void Validation_Requests_Should_Fail_WhenCcLengthExceedsLimit()
282282

283283
for (var i = 1; i <= 1001; i++)
284284
{
285-
internalRequest.Cc($"recipient{i}.domain.com");
285+
internalRequest.Cc($"recipient{i}@domain.com");
286286
}
287287

288288
var result = BatchEmailRequestValidator.Instance.TestValidate(request);
@@ -299,7 +299,7 @@ public void Validation_Requests_Should_Pass_WhenCcLengthWithinLimit()
299299

300300
for (var i = 1; i <= 1000; i++)
301301
{
302-
internalRequest.Cc($"recipient{i}.domain.com");
302+
internalRequest.Cc($"recipient{i}@domain.com");
303303
}
304304

305305
var result = BatchEmailRequestValidator.Instance.TestValidate(request);

tests/Mailtrap.UnitTests/Emails/Requests/EmailRequestBuilderTests.Attachment.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ private static EmailRequest Attach_CreateAndValidate(params Attachment[] attachm
9797
[Test]
9898
public void Attach_Should_ThrowArgumentNullException_WhenRequestIsNull_2()
9999
{
100-
var request = EmailRequest.Create();
101-
102100
var act = () => EmailRequestBuilder.Attach<EmailRequest>(null!, Content, FileName);
103101

104102
act.Should().Throw<ArgumentNullException>();

0 commit comments

Comments
 (0)