public static void AssertConstructor <TPar1, TPar2, TReturn>(this StructureTest test, Expression <Func <TPar1, TPar2, TReturn> > locator, params IMemberVerifier[] verifiers) { NewExpression newExpression = (NewExpression)locator.Body; ConstructorInfo constructorInfo = newExpression.Constructor; test.AssertConstructor(constructorInfo, verifiers); }
public static void AssertPublicConstructor <TPar1, TReturn>(this StructureTest test, Expression <Func <TPar1, TReturn> > locator) { test.AssertConstructor <TPar1, TReturn>(locator, new MemberAccessLevelVerifier(AccessLevels.Public)); }