public void Test(Type type, bool expectTrue) { var constructor = new AnalysisDataResolver().Resolve(type.GetConstructor(Type.EmptyTypes)); var strategy = new TestableEmptyDefaultConstructorsSelectionStrategy(); bool result = strategy.ShouldSelect(constructor, null); if (expectTrue) Assert.IsTrue(result); else Assert.IsFalse(result); }
public void Test(Type type, bool expectTrue) { var constructor = new AnalysisDataResolver().Resolve(type.GetConstructor(Type.EmptyTypes)); var strategy = new TestableEmptyDefaultConstructorsSelectionStrategy(); bool result = strategy.ShouldSelect(constructor, null); if (expectTrue) { Assert.IsTrue(result); } else { Assert.IsFalse(result); } }