public void Set_Assigned_On_With_Previous_Not_Complete() { IPlanElementUtils peUtil = new PlanElementUtils { }; var mods = new List <AD.Module> { new AD.Module { Id = "123456789012345678901234", Completed = false } }; AD.Module mod = new DTO.Module { Previous = "123456789012345678901234" }; peUtil.SetEnabledState(mods, mod, "123456789012345612341234", true); Assert.IsNull(mod.AssignDate); }
public void Set_Assigned_On_With_Previous_Complete() { IPlanElementUtils peUtil = new PlanElementUtils { }; var mods = new List <AD.Module> { new AD.Module { Id = "123456789012345678901234", Completed = true } }; AD.Module mod = new DTO.Module { Previous = "123456789012345678901234" }; peUtil.SetEnabledState(mods, mod, "123456789012345612341234", true); Assert.AreEqual(DateTime.UtcNow.Date, ((DateTime)mod.AssignDate).Date); }