Exemplo n.º 1
0
        public void GetUnits_NotUniqueUnit()
        {
            var unitProvider = new UnitProvider(CultureInfo.InvariantCulture);

            unitProvider.RegisterUnit(Length.Metre, "m");
            unitProvider.RegisterUnit(TypographicLength.Metre, "m");
            var units = unitProvider.GetUnits(typeof(Length));

            Assert.AreEqual(1, units.Count);
            Assert.AreEqual(Length.Metre, units["m"]);
        }
Exemplo n.º 2
0
 public void GetUnits_NotUniqueUnit()
 {
     var unitProvider = new UnitProvider(CultureInfo.InvariantCulture);
     unitProvider.RegisterUnit(Length.Metre, "m");
     unitProvider.RegisterUnit(TypographicLength.Metre, "m");
     var units = unitProvider.GetUnits(typeof(Length));
     Assert.AreEqual(1, units.Count);
     Assert.AreEqual(Length.Metre, units["m"]);
 }