public void TestExcludedPropertiesWithLambda() { var tester = new AssemblyTester(typeof(IncorrectConstructors).Assembly); tester.Exclusions.AddType(typeof(GenericClass<>)); tester.AddPropertyExclusion<IncorrectProperties>(x => x.Dummy4); tester.AddPropertyExclusion<IncorrectProperties>(x => x.Dummy3); tester.TestAssembly(true, false); }