public void TestConstructorOf() { var actualCtor1 = typeof(DummyType).GetConstructor(Type.EmptyTypes); var actualCtor2 = typeof(DummyType).GetConstructor(new[] { typeof(string) }); var ctor1 = ReflectionUtility.ConstructorOf(() => new DummyType()); var ctor2 = ReflectionUtility.ConstructorOf(() => new DummyType(string.Empty)); Assert.IsNotNull(ctor1); Assert.IsNotNull(ctor2); Assert.AreEqual(actualCtor1, ctor1); Assert.AreEqual(actualCtor2, ctor2); }