Ejemplo n.º 1
0
            public void Set_Status_As_Enabled_AssignDate()
            {
                IPlanElementUtils pUtils = new PlanElementUtils();

                var mods = new List <AD.PlanElement>
                {
                    new AD.PlanElement {
                        Id = "000006789012345678901234", Completed = true
                    },
                    new AD.PlanElement {
                        Previous = "000006789012345678901234"
                    }
                };

                pUtils.SetEnabledStatusByPrevious(mods, "123456789012345678901234", true);
                Assert.IsTrue(mods[1].Enabled);
            }
Ejemplo n.º 2
0
            public void Set_As_Enabled_Module_AssignDate()
            {
                IPlanElementUtils pUtils = new PlanElementUtils();

                var mods = new List <AD.Module>
                {
                    new AD.Module {
                        Id = "000006789012345678901234", Completed = true
                    },
                    new AD.Module
                    {
                        Enabled  = true,
                        Previous = "000006789012345678901234",
                        Actions  = new List <AD.Actions> {
                            new AD.Actions {
                                Enabled = true
                            }
                        }
                    }
                };

                pUtils.SetEnabledStatusByPrevious(mods, "123456789012345678901234", true);
                Assert.AreEqual(DateTime.UtcNow.Date, ((DateTime)mods[1].Actions[0].AssignDate).Date);
            }