Exemplo n.º 1
0
 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"));
 }
Exemplo n.º 2
0
        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"));
        }
Exemplo n.º 3
0
        public ActionResult Edit(long id)
        {
            var model = new CreateEditViewModel();
            var unit  = unitProvider.GetUnit(id);

            mapper.Map(unit, model);

            return(PartialView("CreateEdit", model));
        }