Beispiel #1
0
        public void PropertiesThatAreNotGenericCollectionsWillNotBeSelected()
        {
            // Arrange
            var sut            = new GenericCollectionPropertyQuery();
            var type           = typeof(DoublePropertyHolder <string, ArrayList>);
            var expectedResult = Enumerable.Empty <PropertyInfo>();

            // Act
            var result = sut.SelectProperties(type);

            // Assert
            Assert.True(expectedResult.SequenceEqual(result));
        }
Beispiel #2
0
        public void GenericCollectionPropertiesWillBeSelected()
        {
            // Arrange
            var sut            = new GenericCollectionPropertyQuery();
            var type           = typeof(CollectionHolder <string>);
            var expectedResult = type.GetTypeInfo().GetProperties();

            // Act
            var result = sut.SelectProperties(type);

            // Assert
            Assert.True(expectedResult.SequenceEqual(result));
        }