Skip to content

Commit cdadcec

Browse files
committed
refactor namespace
1 parent 6c29be7 commit cdadcec

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed

test/SocketLabs.Tests/Helper/RandomHelper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Linq;
3+
using System.Linq;
44
using SocketLabs.InjectionApi.Message;
55

6-
namespace SocketLabs.Test.Helper
6+
namespace SocketLabs.Tests.Helper
77
{
88
internal class RandomHelper
99
{
@@ -45,7 +45,7 @@ public static List<IBulkRecipient> RandomListOfBulkRecipients(int count)
4545
recipients.Add(new BulkRecipient(RandomEmail()));
4646
}
4747
return recipients;
48-
}
48+
}
4949

5050
public static int RandomInt()
5151
{

test/SocketLabs.Tests/Validation/SendValidatorTest.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
using SocketLabs.InjectionApi;
44
using SocketLabs.InjectionApi.Core;
55
using SocketLabs.InjectionApi.Message;
6-
using SocketLabs.Test.Helper;
6+
using SocketLabs.Tests.Helper;
77

8-
namespace SocketLabs.Test.Validation
8+
namespace SocketLabs.Tests.Validation
99
{
1010
[TestClass]
1111
public class SendValidatorTest
@@ -25,7 +25,7 @@ public void ValidateIMessageBase_ReturnsMessageValidationEmptySubject_WhenSubjec
2525
//Assert
2626
Assert.AreEqual(SendResult.MessageValidationEmptySubject, actual);
2727
}
28-
28+
2929
[TestMethod]
3030
public void ValidateIMessageBase_ReturnsEmailAddressValidationMissingFrom_WhenFromRecipientIsNull()
3131
{
@@ -338,7 +338,7 @@ public void HasMessageBody_ReturnsFalse_WhenPlainTextBodyAndHtmlBodyAndApiTempla
338338
//Assert
339339
Assert.IsFalse(actual);
340340
}
341-
341+
342342
[TestMethod]
343343
public void HasMessageBody_ReturnsFalse_WhenPlainTextBodyAndHtmlBodyAndApiTemplateAndAmpBodyIsEmpty()
344344
{
@@ -370,7 +370,7 @@ public void HasApiTemplate_ReturnsTrue_WhenApiTemplateIsNotZero()
370370
//Arrange
371371
var message = new BasicMessage
372372
{
373-
ApiTemplate = RandomHelper.RandomInt(1,10)
373+
ApiTemplate = RandomHelper.RandomInt(1, 10)
374374
};
375375
var validator = new SendValidator();
376376

@@ -427,10 +427,10 @@ public void HasApiTemplate_ReturnsFalse_WhenApiTemplateIsMinValue()
427427
}
428428

429429
#endregion
430-
430+
431431

432432
#region ValidateRecipients(IBasicMessage payload)
433-
433+
434434
[TestMethod]
435435
public void ValidateRecipients_BasicMessage_ReturnsNoRecipients_WhenToAndCcAndBccIsNull()
436436
{
@@ -503,7 +503,7 @@ public void ValidateRecipients_BasicMessage_ReturnsTooManyRecipients_WhenToAndCc
503503
var validator = new SendValidator();
504504
var message = new BasicMessage
505505
{
506-
To = RandomHelper.RandomListOfRecipients(validator.MaximumRecipientsPerMessage/2),
506+
To = RandomHelper.RandomListOfRecipients(validator.MaximumRecipientsPerMessage / 2),
507507
Cc = RandomHelper.RandomListOfRecipients(validator.MaximumRecipientsPerMessage / 2),
508508
Bcc = RandomHelper.RandomListOfRecipients(validator.MaximumRecipientsPerMessage / 2)
509509
};
@@ -531,12 +531,12 @@ public void ValidateRecipients_BasicMessage_ReturnsTooManyRecipients_WhenToHasTo
531531
//Assert
532532
Assert.AreEqual(SendResult.RecipientValidationMaxExceeded, actual.Result);
533533
}
534-
534+
535535
#endregion
536-
536+
537537

538538
#region ValidateRecipients(IBulkMessage message)
539-
539+
540540
[TestMethod]
541541
public void ValidateRecipients_BulkMessage_ReturnsNoRecipients_WhenToIsNull()
542542
{
@@ -573,9 +573,9 @@ public void ValidateRecipients_BulkMessage_ReturnsTooManyRecipients_WhenToHasToM
573573
var validator = new SendValidator();
574574
var message = new BulkMessage
575575
{
576-
To = RandomHelper.RandomListOfBulkRecipients(validator.MaximumRecipientsPerMessage +1)
576+
To = RandomHelper.RandomListOfBulkRecipients(validator.MaximumRecipientsPerMessage + 1)
577577
};
578-
578+
579579
//Act
580580
var actual = validator.ValidateRecipients(message);
581581

@@ -634,7 +634,7 @@ public void HasFromAddress_ReturnsFalse_WhenFromRecipientIsNull()
634634
//Assert
635635
Assert.IsFalse(actual);
636636
}
637-
637+
638638
[TestMethod]
639639
public void HasFromAddress_ReturnsFalse_WhenFromRecipientIsEmpty()
640640
{
@@ -670,7 +670,7 @@ public void HasFromAddress_ReturnsTrue_WhenFromRecipientIsNotEmpty()
670670
}
671671

672672
#endregion
673-
673+
674674

675675
#region GetFullRecipientCount
676676

@@ -680,7 +680,7 @@ public void GetFullRecipientCount_BasicMessage_ReturnsGT0_WhenOnlyToRecipientsHa
680680
//Arrange
681681
var message = new BasicMessage
682682
{
683-
To = new List<IEmailAddress> { new EmailAddress(RandomHelper.RandomEmail())}
683+
To = new List<IEmailAddress> { new EmailAddress(RandomHelper.RandomEmail()) }
684684
};
685685
var validator = new SendValidator();
686686

@@ -707,7 +707,7 @@ public void GetFullRecipientCount_BasicMessage_ReturnsGT0_WhenOnlyCcRecipientsHa
707707
//Assert
708708
Assert.IsTrue(actual > 0);
709709
}
710-
710+
711711
[TestMethod]
712712
public void GetFullRecipientCount_BasicMessage_ReturnsGT0_WhenOnlyBccRecipientsHasOneValue()
713713
{
@@ -826,7 +826,7 @@ public void ValidateCredentials_ReturnsSuccess_WhenApiKeyAndServerIdIsNotEmpty()
826826

827827

828828
#region HasValidCustomHeaders
829-
829+
830830
[TestMethod]
831831
public void HasValidCustomHeaders_ReturnsFalse_WhenKeyAndValueAreEmpty()
832832
{
@@ -911,10 +911,10 @@ public void HasValidCustomHeaders_ReturnsTrue_WhenDictionaryIsValid()
911911
}
912912

913913
#endregion
914-
914+
915915

916916
#region HasInvalidRecipients(IBasicMessage message)
917-
917+
918918
[TestMethod]
919919
public void HasInvalidRecipients_IBasicMessage_ReturnsListOfOne_WhenToHasOneInvalid()
920920
{
@@ -1025,7 +1025,7 @@ public void HasInvalidRecipients_IBulkMessage_ReturnsListOfOne_WhenToHasOneInval
10251025
//Assert
10261026
Assert.AreEqual(1, actual.Count);
10271027
}
1028-
1028+
10291029
[TestMethod]
10301030
public void HasInvalidRecipients_IBasicMessage_ReturnsListOfThree_WhenToHasThreeInvalid()
10311031
{
@@ -1092,7 +1092,7 @@ public void FindInvalidRecipients_ListOfEmailAddress_ReturnsNull_WhenRecipientsI
10921092
public void FindInvalidRecipients_ListOfEmailAddress_ReturnsNull_WhenRecipientsIsEmpty()
10931093
{
10941094
//Arrange
1095-
var message = new List<IEmailAddress>();
1095+
var message = new List<IEmailAddress>();
10961096
var validator = new SendValidator();
10971097

10981098
//Act
@@ -1106,7 +1106,7 @@ public void FindInvalidRecipients_ListOfEmailAddress_ReturnsNull_WhenRecipientsI
11061106
public void FindInvalidRecipients_ListOfEmailAddress_ReturnsNull_WhenNoInvalidRecipientsFound()
11071107
{
11081108
//Arrange
1109-
var message = new List<IEmailAddress> {new EmailAddress(RandomHelper.RandomEmail())};
1109+
var message = new List<IEmailAddress> { new EmailAddress(RandomHelper.RandomEmail()) };
11101110
var validator = new SendValidator();
11111111

11121112
//Act
@@ -1134,7 +1134,7 @@ public void FindInvalidRecipients_ListOfEmailAddress_ReturnsList_WhenInvalidReci
11341134

11351135

11361136
#region HasInvalidRecipients(BulkRecipient message)
1137-
1137+
11381138
[TestMethod]
11391139
public void FindInvalidRecipients_ListOfBulkRecipient_ReturnsNull_WhenRecipientsIsNull()
11401140
{

0 commit comments

Comments
 (0)