Esempio n. 1
0
 public void TestFourteenYearOldAndADayLongDateMeetsCOPPARequirements()
 {
     Assert.IsTrue(COPPA.AgeMeetsCOPPARequirements(DateTime.Today.AddYears(-14).AddDays(-1).AsMilliseconds()));
 }
Esempio n. 2
0
 public void TestFourteenYearOldDayShortLongDateDoesntMeetsCOPPARequirements()
 {
     Assert.IsFalse(COPPA.AgeMeetsCOPPARequirements(DateTime.Today.AddYears(-14).AddDays(1).AsMilliseconds()));
 }
Esempio n. 3
0
 public void TestFiveYearOldLongDateDoesntMeetsCOPPARequirements()
 {
     Assert.IsFalse(COPPA.AgeMeetsCOPPARequirements(DateTime.Today.AddYears(-5).AsMilliseconds()));
     Assert.IsFalse(COPPA.AgeMeetsCOPPARequirements(DateTime.Today.AddYears(-5).AddMonths(6).AddDays(4).AsMilliseconds()));
 }
Esempio n. 4
0
 public void TestThirteenYearOldLongDateDoesntMeetsCOPPARequirements()
 {
     Assert.IsFalse(COPPA.AgeMeetsCOPPARequirements(DateTime.Today.AddYears(-13).AsMilliseconds()));
     Assert.IsFalse(COPPA.AgeMeetsCOPPARequirements(DateTime.Today.AddYears(-13).AddMonths(7).AsMilliseconds()));
 }
Esempio n. 5
0
 public void TestHundredYearOldDateTimeMeetsCOPPARequirements()
 {
     Assert.IsTrue(COPPA.AgeMeetsCOPPARequirements(DateTime.Today.AddYears(-100)));
     Assert.IsTrue(COPPA.AgeMeetsCOPPARequirements(DateTime.Today.AddYears(-100).AddDays(-19)));
     Assert.IsTrue(COPPA.AgeMeetsCOPPARequirements(DateTime.Today.AddYears(-100).AddMonths(-3).AddDays(-21)));
 }