public void TestPropertyValueAttributeCacheCollisionsViaExpression()
        {
            // Act
            var actual = PropertyValueAttributeCache.Get <PropertyValueAttributeClass>(e => e.PropertyDecimal, true);

            // Assert
            Assert.AreEqual(11, actual.Count());
        }
        public void TestPropertyValueAttributeCacheWithMappedAttributesViaExpression()
        {
            // Act
            var actual = PropertyValueAttributeCache.Get <PropertyValueAttributeClass>(e => e.PropertyString, true);

            // Assert
            Assert.AreEqual(7, actual.Count());
        }
        public void TestPropertyValueAttributeCacheWithMappedAttributesWithIncludeMappingsFalseViaExpression()
        {
            // Act
            var actual = PropertyValueAttributeCache.Get <PropertyValueAttributeClass>(e => e.PropertyString, false);

            // Assert
            Assert.AreEqual(0, actual.Count());
        }
        public void TestPropertyValueAttributeCacheCollisionsWithIncludeMappingsFalseViaExpression()
        {
            // Act
            var actual = PropertyValueAttributeCache.Get <PropertyValueAttributeClass>(e => e.PropertyDecimal, false);

            // Assert
            Assert.AreEqual(7, actual.Count());
        }
        public void TestPropertyValueAttributeCacheWithAttributesViaExpression()
        {
            // Act
            var actual = PropertyValueAttributeCache.Get <PropertyValueAttributeClass>(e => e.PropertyInt);

            // Assert
            Assert.AreEqual(2, actual.Count());
        }
示例#6
0
        public void TestFluentMapPropertyValueAttributesMappingWithMapAttributeWithIncludeMappingFalse()
        {
            // Act
            var actual = PropertyValueAttributeCache
                         .Get <FluentMapperTestWithAttributesClass>(e => e.PropertyString, false);

            // Assert
            Assert.AreEqual(8, actual.Count());
        }
示例#7
0
        public void TestFluentMapPropertyValueAttributesMapping()
        {
            // Act
            var actual = PropertyValueAttributeCache
                         .Get <FluentMapperTestClass>(e => e.PropertyString, true);

            // Assert
            Assert.AreEqual(7, actual.Count());
        }
        public void TestPropertyValueAttributeCacheCollisionsViaField()
        {
            // Prepare
            var field = new Field("PropertyDecimal");

            // Act
            var actual = PropertyValueAttributeCache.Get <PropertyValueAttributeClass>(field, true);

            // Assert
            Assert.AreEqual(11, actual.Count());
        }
        public void TestPropertyValueAttributeCacheWithAttributesViaField()
        {
            // Prepare
            var field = new Field("PropertyInt");

            // Act
            var actual = PropertyValueAttributeCache.Get <PropertyValueAttributeClass>(field);

            // Assert
            Assert.AreEqual(2, actual.Count());
        }
        public void TestPropertyValueAttributeCacheWithAttributesViaPropertyName()
        {
            // Prepare
            var propertyName = "PropertyInt";

            // Act
            var actual = PropertyValueAttributeCache.Get <PropertyValueAttributeClass>(propertyName);

            // Assert
            Assert.AreEqual(2, actual.Count());
        }
        public void TestPropertyValueAttributeCacheCollisionsWithIncludeMappingsFalseViaPropertyInfo()
        {
            // Prepare
            var classProperty = PropertyCache.Get <PropertyValueAttributeClass>("PropertyDecimal", false);

            // Act
            var actual = PropertyValueAttributeCache.Get(classProperty.PropertyInfo, false);

            // Assert
            Assert.AreEqual(7, actual.Count());
        }
        public void TestPropertyValueAttributeCacheWithMappedAttributesViaPropertyName()
        {
            // Prepare
            var propertyName = "PropertyString";

            // Act
            var actual = PropertyValueAttributeCache.Get <PropertyValueAttributeClass>(propertyName, true);

            // Assert
            Assert.AreEqual(7, actual.Count());
        }
        public void TestPropertyValueAttributeCacheCollisionsWithIncludeMappingsFalseViaField()
        {
            // Prepare
            var field = new Field("PropertyDecimal");

            // Act
            var actual = PropertyValueAttributeCache.Get <PropertyValueAttributeClass>(field, false);

            // Assert
            Assert.AreEqual(7, actual.Count());
        }
        public void TestPropertyValueAttributeCacheCollisionsWithIncludeMappingsFalseViaPropertyName()
        {
            // Prepare
            var propertyName = "PropertyDecimal";

            // Act
            var actual = PropertyValueAttributeCache.Get <PropertyValueAttributeClass>(propertyName, false);

            // Assert
            Assert.AreEqual(7, actual.Count());
        }
        public void TestPropertyValueAttributeCacheWithAttributesViaPropertyInfo()
        {
            // Prepare
            var classProperty = PropertyCache.Get <PropertyValueAttributeClass>("PropertyInt", true);

            // Act
            var actual = PropertyValueAttributeCache.Get(classProperty.PropertyInfo);

            // Assert
            Assert.AreEqual(2, actual.Count());
        }
        public void TestPropertyValueAttributeCacheWithMappedAttributesWithIncludeMappingsFalseViaPropertyName()
        {
            // Prepare
            var propertyName = "PropertyString";

            // Act
            var actual = PropertyValueAttributeCache.Get <PropertyValueAttributeClass>(propertyName, false);

            // Assert
            Assert.AreEqual(0, actual.Count());
        }
        public void TestPropertyValueAttributeCacheCollisionsViaPropertyName()
        {
            // Prepare
            var propertyName = "PropertyDecimal";

            // Act
            var actual = PropertyValueAttributeCache.Get <PropertyValueAttributeClass>(propertyName, true);

            // Assert
            Assert.AreEqual(11, actual.Count());
        }
        public void TestPropertyValueAttributeCacheWithMappedAttributesWithIncludeMappingsFalseViaPropertyInfo()
        {
            // Prepare
            var classProperty = PropertyCache.Get <PropertyValueAttributeClass>("PropertyString", true);

            // Act
            var actual = PropertyValueAttributeCache.Get(classProperty.PropertyInfo, false);

            // Assert
            Assert.AreEqual(0, actual.Count());
        }
        public void TestPropertyValueAttributeCacheWithMappedAttributesWithIncludeMappingsFalseViaField()
        {
            // Prepare
            var field = new Field("PropertyString");

            // Act
            var actual = PropertyValueAttributeCache.Get <PropertyValueAttributeClass>(field, false);

            // Assert
            Assert.AreEqual(0, actual.Count());
        }
        public void TestPropertyValueAttributeCacheCollisionsViaPropertyInfo()
        {
            // Prepare
            var classProperty = PropertyCache.Get <PropertyValueAttributeClass>("PropertyDecimal", true);

            // Act
            var actual = PropertyValueAttributeCache.Get(classProperty.PropertyInfo, true);

            // Assert
            Assert.AreEqual(11, actual.Count());
        }
示例#21
0
        public void Cleanup()
        {
            ClassMapper.Clear();
            PropertyMapper.Clear();
            PrimaryMapper.Clear();
            IdentityMapper.Clear();
            TypeMapper.Clear();
            //PropertyHandlerMapper.Clear();
            PropertyValueAttributeMapper.Clear();

            ClassMappedNameCache.Flush();
            PropertyCache.Flush();
            PrimaryCache.Flush();
            IdentityCache.Flush();
            TypeMapCache.Flush();
            //PropertyHandlerMapper.Clear();
            PropertyValueAttributeCache.Flush();
        }
示例#22
0
        public void TestFluentMapPropertyValueAttributesMappingOverride()
        {
            // Prepare
            var attributes = GetPropertyValueAttributesForOverriding().ToList();

            // Setup
            FluentMapper
            .Entity <FluentMapperTestClass>()
            .PropertyValueAttributes(e => e.PropertyString, attributes, true);

            // Act
            var actual = PropertyValueAttributeCache
                         .Get <FluentMapperTestClass>(e => e.PropertyString, true).ToList();

            // Assert
            for (var i = 0; i < attributes.Count; i++)
            {
                Assert.AreEqual(attributes[i], actual[i]);
            }
        }
示例#23
0
 public void Cleanup()
 {
     PropertyValueAttributeCache.Flush();
     PropertyValueAttributeMapper.Clear();
 }