Example #1
0
        private static CQuantity Map(this C_DV_QUANTITY model)
        {
            var quantity = new CQuantity
            {
                ReferenceModelTypeName = model.rm_type_name,
                NodeId = model.node_id
            };

            if (model.property != null)
            {
                quantity.Property = model.property.Map();
            }
            if (model.occurrences != null)
            {
                quantity.Occurences = model.occurrences.Map();
            }
            foreach (C_QUANTITY_ITEM unit in model.list)
            {
                quantity.QuantityConstraints.Add(new CQuantityItem
                {
                    Units     = unit.units,
                    Magnitude = unit.magnitude.Map()
                });
            }
            return(quantity);
        }
Example #2
0
 public void IsValidValueThrowsException()
 {
     var instance = new CQuantity();
     var result   = instance.IsValidValue(null);
 }
Example #3
0
 public void DefaultValueThrowsException()
 {
     var instance = new CQuantity();
     var result   = instance.DefaultValue();
 }
Example #4
0
 public void IsSubsetOfThrowsException()
 {
     var instance = new CQuantity();
     var result   = instance.IsSubsetOf(null);
 }
Example #5
0
        public void ListsAreNotNull()
        {
            var instance = new CQuantity();

            Assert.IsNotNull(instance.QuantityConstraints);
        }
Example #6
0
 public void ListsAreNotNull()
 {
     var instance = new CQuantity();
     Assert.IsNotNull(instance.QuantityConstraints);
 }
Example #7
0
 public void IsValidValueThrowsException()
 {
     var instance = new CQuantity();
     var result = instance.IsValidValue(null);
 }
Example #8
0
 public void IsSubsetOfThrowsException()
 {
     var instance = new CQuantity();
     var result = instance.IsSubsetOf(null);
 }
Example #9
0
 public void DefaultValueThrowsException()
 {
     var instance = new CQuantity();
     var result = instance.DefaultValue();
 }