public void Extension_throws_exception_when_used_with_invalid_expression()
        {
            var fixture = new TypePoolFixture();

            // Act
            string propertyName = fixture.GetPropertyName(p => p.IsEnabled && p.IsEnabled);

            // Assert
            Assert.AreEqual("CreationDate", propertyName);
        }
        public void Get_properties_from_instance_with_predicate()
        {
            // Arrange
            var fixture = new TypePoolFixture();

            // Act
            IEnumerable<PropertyInfo> properties =
                PropertyCache.GetPropertiesForType(
                    fixture,
                    p => p.Name == fixture.GetPropertyName(pr => pr.IsEnabled));

            // Assert
            Assert.IsNotNull(properties);
        }