-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
58b8c52
commit d531e17
Showing
5 changed files
with
113 additions
and
30 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
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
39 changes: 39 additions & 0 deletions
39
src/tests/Fusion.Summary.Functions.Tests/Notifications/WeeklyTaskOwnerReportDataCreator.cs
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using FluentAssertions; | ||
using Fusion.Summary.Functions.ReportCreator; | ||
|
||
namespace Fusion.Summary.Functions.Tests.Notifications; | ||
|
||
public class WeeklyTaskOwnerReportDataCreatorTests | ||
{ | ||
[Fact] | ||
public void ActiveAdmins_AreConsideredExpiring_IfValidToIsLessThanThreeMonths() | ||
{ | ||
var now = DateTime.UtcNow; | ||
WeeklyTaskOwnerReportDataCreator.NowDate = now; | ||
|
||
var admins = new List<PersonAdmin>() | ||
{ | ||
new PersonAdmin(Guid.NewGuid(), "", now.Add(TimeSpan.FromDays(1))), // Is expiring | ||
new PersonAdmin(Guid.NewGuid(), "", now.Add(TimeSpan.FromDays(90))), // Is expiring | ||
new PersonAdmin(Guid.NewGuid(), "", now.Add(TimeSpan.FromDays(120))), // Is not expiring | ||
new PersonAdmin(Guid.NewGuid(), "", now.Add(TimeSpan.FromDays(365))) // Is not expiring | ||
}; | ||
|
||
var data = WeeklyTaskOwnerReportDataCreator.GetExpiringAdmins(admins); | ||
|
||
data.Should().HaveCount(2); | ||
} | ||
|
||
|
||
[Fact] | ||
public void GetPositionsEndingNextThreeMonthsTest() | ||
{ | ||
// throw new NotImplementedException(); | ||
} | ||
|
||
[Fact] | ||
public void GetTBNPositionsStartingWithinThreeMontsTests() | ||
{ | ||
// throw new NotImplementedException(); | ||
} | ||
} |