Ejemplo n.º 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))
         );
 }
Ejemplo n.º 2
0
 public void TestCache()
 {
     Assert.That(
         Constructor.AsFunc <long, DateTime>(),
         Is.SameAs(Constructor.AsFunc <long, DateTime>())
         );
 }
Ejemplo n.º 3
0
 public void TestFunc2()
 {
     Assert.That(
         Constructor.AsFunc <long, DateTimeKind, DateTime>()(Ticks, Kind),
         Is.EqualTo(new DateTime(Ticks, Kind))
         );
 }
Ejemplo n.º 4
0
 public void TestFuncForConstructorThatDoesntExist()
 {
     Assert.That(
         () => Constructor.AsFunc <bool, DateTime>()(true),
         Throws.Exception
         );
 }