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"]); }
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"]); }