예제 #1
0
 public void GetAssociatedRangeForIdentifierWithoutRangeThrowsException()
 {
     foreach (var identifier in TimeIdentifierUtil.GetYears())
     {
         Assert.Throws <ArgumentOutOfRangeException>(() => identifier.GetAssociatedRange());
     }
 }
 public void GetYearsReturnsYears()
 {
     Assert.Equal(new[]
     {
         AcademicYear,
         CalendarYear,
         FinancialYear,
         TaxYear,
         ReportingYear
     }, TimeIdentifierUtil.GetYears());
 }
예제 #3
0
 public void TimeIdentifiersHaveAssociatedRanges()
 {
     AssertTimeIdentifiersMeetCondition(identifier => identifier.HasAssociatedRange(),
                                        _allTimeIdentifiers.Except(TimeIdentifierUtil.GetYears()));
 }
예제 #4
0
 public void TimeIdentifiersAreYears()
 {
     AssertTimeIdentifiersMeetCondition(identifier => identifier.IsYear(),
                                        TimeIdentifierUtil.GetYears());
 }