예제 #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);
        }
예제 #2
0
 public void IsValidValueThrowsException()
 {
     var instance = new CQuantity();
     var result   = instance.IsValidValue(null);
 }
예제 #3
0
 public void DefaultValueThrowsException()
 {
     var instance = new CQuantity();
     var result   = instance.DefaultValue();
 }
예제 #4
0
 public void IsSubsetOfThrowsException()
 {
     var instance = new CQuantity();
     var result   = instance.IsSubsetOf(null);
 }
예제 #5
0
        public void ListsAreNotNull()
        {
            var instance = new CQuantity();

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