예제 #1
0
 public AttributeDefinition(AttributeDefinition def)
 {
     Name        = def.Name;
     ShortName   = def.ShortName;
     Abbreviated = def.Abbreviated;
     Description = def.Description;
     Type        = def.Type;
     Minimum     = def.Minimum;
     Maximum     = def.Maximum;
     Calculation = new AttributeCalculation(def.Calculation);
 }
예제 #2
0
 public AttributeDefinition()
 {
     Type        = AttributeDefinitionType.None;
     Name        = "";
     ShortName   = "";
     Abbreviated = "";
     Description = "";
     Minimum     = 0;
     Maximum     = 0;
     Calculation = new AttributeCalculation();
 }
예제 #3
0
 public AttributeDefinition(string name, string short_name, string abbreviated, string description, int minimum, int maximum, AttributeDefinitionType type,
                            AttributeCalculation calc)
 {
     Name        = name;
     ShortName   = short_name;
     Abbreviated = abbreviated;
     Description = description;
     Type        = type;
     Minimum     = minimum;
     Maximum     = maximum;
     Calculation = new AttributeCalculation(calc);
 }
        public void TypeTest()
        {
            var target = new AttributeDefinitionType<DisplayAttribute>();

            target.Type.Should()
                  .BeNull();

            var expected = GetType();
            target.Type = expected;

            target.Type.Should()
                  .Be( expected );
        }
        public void AttributesTest()
        {
            var target = new AttributeDefinitionType<DisplayAttribute>();

            target.Attributes.Should()
                  .BeNull();

            var expected = new List<DisplayAttribute>();
            target.Attributes = expected;

            target.Attributes.Should()
                  .BeSameAs( expected );
        }
        public void TypeTest()
        {
            var target = new AttributeDefinitionType <ObsoleteAttribute>();

            target.Type.Should()
            .BeNull();

            var expected = GetType();

            target.Type = expected;

            target.Type.Should()
            .Be(expected);
        }
        public void AttributesTest()
        {
            var target = new AttributeDefinitionType <ObsoleteAttribute>();

            target.Attributes.Should()
            .BeNull();

            var expected = new List <ObsoleteAttribute>();

            target.Attributes = expected;

            target.Attributes.Should()
            .BeSameAs(expected);
        }