コード例 #1
0
 public void TestLambdaForConstructorThatDoesntExist()
 {
     Assert.That(
         () => Constructor.AsLambda <bool, DateTime>().Compile()(true),
         Throws.Exception
         );
 }
コード例 #2
0
 public void TestLambda2()
 {
     Assert.That(
         Constructor.AsLambda <long, DateTimeKind, DateTime>().Compile()(Ticks, Kind),
         Is.EqualTo(new DateTime(Ticks, Kind))
         );
 }
コード例 #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))
         );
 }