Ejemplo n.º 1
0
        public void Initialize()
        {
            var attributes = GetPropertyValueAttributes();

            PropertyValueAttributeMapper.Add <PropertyValueAttributeClass>(e => e.PropertyString, attributes, true);
            PropertyValueAttributeMapper.Add <PropertyValueAttributeClass>(e => e.PropertyDecimal, attributes, true);
        }
        public void TestPropertyValueAttributeMapperViaExpression()
        {
            // Prepare
            var attributes = GetPropertyValueAttributes();

            // Act
            PropertyValueAttributeMapper.Add <PropertyValueAttributeClass>(e => e.PropertyString,
                                                                           attributes);
            var actual = PropertyValueAttributeMapper.Get <PropertyValueAttributeClass>(e => e.PropertyString);

            // Assert
            Assert.AreEqual(attributes, actual);
        }
        public void TestPropertyValueAttributeMapperViaField()
        {
            // Prepare
            var field      = new Field("PropertyString");
            var attributes = GetPropertyValueAttributes();

            // Act
            PropertyValueAttributeMapper.Add <PropertyValueAttributeClass>(field,
                                                                           attributes);
            var actual = PropertyValueAttributeMapper.Get <PropertyValueAttributeClass>(field);

            // Assert
            Assert.AreEqual(attributes, actual);
        }
        public void TestPropertyValueAttributeMapperViaPropertyName()
        {
            // Prepare
            var propertyName = "PropertyString";
            var attributes   = GetPropertyValueAttributes();

            // Act
            PropertyValueAttributeMapper.Add <PropertyValueAttributeClass>(propertyName,
                                                                           attributes);
            var actual = PropertyValueAttributeMapper.Get <PropertyValueAttributeClass>(propertyName);

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

            // Act
            PropertyValueAttributeMapper.Add(classProperty.PropertyInfo,
                                             attributes);
            var actual = PropertyValueAttributeMapper.Get(classProperty.PropertyInfo);

            // Assert
            Assert.AreEqual(attributes, actual);
        }
Ejemplo n.º 6
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();
        }
Ejemplo n.º 7
0
 public void Cleanup()
 {
     PropertyValueAttributeMapper.Clear();
 }
Ejemplo n.º 8
0
 public void Cleanup()
 {
     PropertyValueAttributeCache.Flush();
     PropertyValueAttributeMapper.Clear();
 }