public void CreateUomPreferenceGivenPreferenceTypeShouldMapDecimals()
        {
            var preferenceType = new UnitOfMeasurePreferenceType {unitOfMeasure = "m", @decimal = 3};
            var uomPreference = new UnitOfMeasurePreference(preferenceType);

            Assert.AreEqual(3, uomPreference.DecimalPlaces);
        }
        public void CreateUomPreferenceGivenPreferenceTypeShouldMapUnit()
        {
            var preferenceType = new UnitOfMeasurePreferenceType {unitOfMeasure = "m"};
            var uomPreference = new UnitOfMeasurePreference(preferenceType);

            Assert.AreEqual(InternalUnitSystemManager.Instance.UnitOfMeasures["m"], uomPreference.UnitOfMeasure);
        }
        public void CreateUomPreferenceGivenPreferenceTypeShouldMapUnitSystemType()
        {
            var preferenceType = new UnitOfMeasurePreferenceType
            {
                unitOfMeasureSystem = "umsEnglish"
            };
            var uomPreference = new UnitOfMeasurePreference(preferenceType);

            Assert.AreEqual(Representation.UnitSystem.UnitSystem.umsEnglish, uomPreference.UnitSystem);
        }
 public void CreateUomPreferenceGivenPreferenceTypeShouldMapMinAndMaxValue()
 {
     var preferenceType = new UnitOfMeasurePreferenceType
     {
         unitOfMeasure = "m",
         minValue = 13.2,
         maxValue = 1445.67
     };
     var uomPreference = new UnitOfMeasurePreference(preferenceType);
     Assert.AreEqual(13.2, uomPreference.MinValue);
     Assert.AreEqual(1445.67, uomPreference.MaxValue);
 }