public void Set_One_Action()
            {
                IPlanElementUtils pUtils = new PlanElementUtils();

                AD.Module mod = new AD.Module
                {
                    Enabled = true,
                    Actions = new List <AD.Actions>
                    {
                        new AD.Actions {
                            Enabled = true
                        },
                        new AD.Actions {
                            Enabled = false
                        }
                    }
                };

                pUtils.SetInitialActions(mod, "123456789012345678901234");

                Assert.IsNotNull(mod.Actions[0].AssignById);
            }
            public void Set_One_Action_Assign_Date()
            {
                IPlanElementUtils pUtils = new PlanElementUtils();

                AD.Module mod = new AD.Module
                {
                    Enabled = true,
                    Actions = new List <AD.Actions>
                    {
                        new AD.Actions {
                            Enabled = true
                        },
                        new AD.Actions {
                            Enabled = false
                        }
                    }
                };

                pUtils.SetInitialActions(mod, "123456789012345678901234");

                Assert.AreEqual(DateTime.UtcNow.Date, ((DateTime)mod.Actions[0].AssignDate).Date);
            }
            public void Set_One_Action_With_State_InProgress()
            {
                IPlanElementUtils pUtils = new PlanElementUtils();

                AD.Module mod = new AD.Module
                {
                    Enabled = true,
                    Actions = new List <AD.Actions>
                    {
                        new AD.Actions {
                            Enabled = true, ElementState = 4
                        },                                                 // inprogress
                        new AD.Actions {
                            Enabled = true, ElementState = 2
                        }                                                 // not started
                    }
                };

                pUtils.SetInitialActions(mod, "123456789012345678901234");

                Assert.IsNotNull(mod.Actions[1].AssignById);
            }