Exemplo n.º 1
0
        public void SutIsPropertyQuery()
        {
            // Arrange
            // Act
            var sut = new GenericCollectionPropertyQuery();

            // Assert
            Assert.IsAssignableFrom <IPropertyQuery>(sut);
        }
Exemplo n.º 2
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));
        }
Exemplo n.º 3
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));
        }