public void GetsStaticConstructor() { var flags = System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic; var obj = new HasStaticCtor(); var ctor = GetConstructor(obj.GetType(), flags, null, new Type[] { }, null); Assert.IsNotNull(ctor); Assert.IsTrue(ctor.IsStatic); }
public void GetsInstanceConstructor() { var flags = System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic; var obj = new HasStaticCtor(); var ctor = GetConstructor(obj.GetType(), flags, null, new Type[] { }, null); Assert.IsNotNull(ctor); Assert.IsFalse(ctor.IsStatic); }