Exemplo n.º 1
0
 public void TestLambdaForConstructorThatDoesntExist()
 {
     Assert.That(
         () => Constructor.AsLambda <bool, DateTime>().Compile()(true),
         Throws.Exception
         );
 }
Exemplo n.º 2
0
 public void TestLambda2()
 {
     Assert.That(
         Constructor.AsLambda <long, DateTimeKind, DateTime>().Compile()(Ticks, Kind),
         Is.EqualTo(new DateTime(Ticks, Kind))
         );
 }
Exemplo n.º 3
0
 public void TestLambda4()
 {
     Assert.That(
         Constructor.AsLambda <int, int, int, Calendar, DateTime>().Compile()(Year, Month, Day, Calendar),
         Is.EqualTo(new DateTime(Year, Month, Day, Calendar))
         );
 }