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