Example #1
0
 public void TestFunc4()
 {
     Assert.That(
         Constructor.AsFunc <int, int, int, Calendar, DateTime>()(Year, Month, Day, Calendar),
         Is.EqualTo(new DateTime(Year, Month, Day, Calendar))
         );
 }
Example #2
0
 public void TestCache()
 {
     Assert.That(
         Constructor.AsFunc <long, DateTime>(),
         Is.SameAs(Constructor.AsFunc <long, DateTime>())
         );
 }
Example #3
0
 public void TestFunc2()
 {
     Assert.That(
         Constructor.AsFunc <long, DateTimeKind, DateTime>()(Ticks, Kind),
         Is.EqualTo(new DateTime(Ticks, Kind))
         );
 }
Example #4
0
 public void TestFuncForConstructorThatDoesntExist()
 {
     Assert.That(
         () => Constructor.AsFunc <bool, DateTime>()(true),
         Throws.Exception
         );
 }