public void GetUnit_NotUniqueUnit_GetsFirstRegistered() { var unitProvider = new UnitProvider(CultureInfo.InvariantCulture); unitProvider.RegisterUnit(Length.Metre, "m"); unitProvider.RegisterUnit(TypographicLength.Metre, "m"); Assert.AreEqual(Length.Metre, unitProvider.GetUnit("m")); }
public ActionResult Edit(long id) { var model = new CreateEditViewModel(); var unit = unitProvider.GetUnit(id); mapper.Map(unit, model); return(PartialView("CreateEdit", model)); }