public void Test_Add_Same_Type_Multiple_Times() { var distinctTypes = new DistinctTypeList(); distinctTypes.Add(typeof(DistinctTypeList)); distinctTypes.Add(typeof(DistinctTypeList)); distinctTypes.GetAllTypes().Count().Should().Be(1); }
public void Validate_DistinctTypeList() { var distinctTypeList = new DistinctTypeList(); distinctTypeList.Add(typeof(TestClassWithoutAttributes.ClassA)); distinctTypeList.Add(typeof(TestClassWithoutAttributes.ClassB)); var results = _attributeChecker.CheckPropertiesForAttributes(distinctTypeList, _attributes); results.Count.Should().Be(distinctTypeList.GetAllTypes().Sum(s => s.GetProperties().Length)); }