public void TestInputNotDateTime() { var instance = new BirthDateValidator(); var param = new object(); Assert.Throws <InvalidOperationException>(() => instance.IsValid(param)); }
public void TestNearPastInput_True() { var instance = new BirthDateValidator(); var param = DateTime.Now.AddSeconds(-1); Assert.IsTrue(instance.IsValid(param)); }
public void TestNearFutureInput_False() { var instance = new BirthDateValidator(); var param = DateTime.Now.AddSeconds(1); Assert.IsFalse(instance.IsValid(param)); }