-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
5,815 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2,101 changes: 2,101 additions & 0 deletions
2,101
Source/StrongGrid.UnitTests/InboudEmailTestData/raw_email.txt
Large diffs are not rendered by default.
Oops, something went wrong.
3,322 changes: 3,322 additions & 0 deletions
3,322
Source/StrongGrid.UnitTests/InboudEmailTestData/raw_email_with_attachments.txt
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
using Moq; | ||
using StrongGrid.Utilities; | ||
using System; | ||
|
||
namespace StrongGrid.UnitTests | ||
{ | ||
internal class MockSystemClock : Mock<ISystemClock> | ||
internal class MockSystemClock : ISystemClock | ||
{ | ||
public MockSystemClock(DateTime currentDateTime) : | ||
this(currentDateTime.Year, currentDateTime.Month, currentDateTime.Day, currentDateTime.Hour, currentDateTime.Minute, currentDateTime.Second, currentDateTime.Millisecond) | ||
{ } | ||
private readonly DateTime _now; | ||
|
||
public MockSystemClock(int year, int month, int day, int hour, int minute, int second, int millisecond) : | ||
base(MockBehavior.Strict) | ||
public DateTime Now => _now; | ||
|
||
public DateTime UtcNow => _now; | ||
|
||
public MockSystemClock(int year, int month, int day, int hour, int minute, int second, int millisecond) | ||
{ | ||
SetupGet(m => m.Now).Returns(new DateTime(year, month, day, hour, minute, second, millisecond, DateTimeKind.Utc)); | ||
SetupGet(m => m.UtcNow).Returns(new DateTime(year, month, day, hour, minute, second, millisecond, DateTimeKind.Utc)); | ||
_now = new DateTime(year, month, day, hour, minute, second, millisecond, DateTimeKind.Utc); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.