Ejemplo n.º 1
0
 public void TestFourteenYearOldAndADayLongDateMeetsCOPPARequirements()
 {
     Assert.IsTrue(COPPA.AgeMeetsCOPPARequirements(DateTime.Today.AddYears(-14).AddDays(-1).AsMilliseconds()));
 }
Ejemplo n.º 2
0
 public void TestFourteenYearOldDayShortLongDateDoesntMeetsCOPPARequirements()
 {
     Assert.IsFalse(COPPA.AgeMeetsCOPPARequirements(DateTime.Today.AddYears(-14).AddDays(1).AsMilliseconds()));
 }
Ejemplo 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()));
 }
Ejemplo 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()));
 }
Ejemplo 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)));
 }