Ejemplo n.º 1
0
        public void IRequirements()
        {
            DefaultDAO dao = new DefaultDAO(to.TestCasesStruct);

            Effect      effect = new Effect(to.TestCasesStruct);
            Requirement req    = new Requirement(to.TestCasesStruct, "Effect requirement");

            effect.AddRequirement(req);

            dao.Save();
            effect.RemoveRequirement(req);
            dao.Save();
        }
Ejemplo n.º 2
0
        public void CreateAddRequirementEditTest()
        {
            Effect      effect = new Effect();
            Requirement req    = new Requirement();

            ce.AddEdit(EditFactory.instance.CreateAddRequirementEdit(effect, req));
            effect.AddRequirement(req);
            ce.End();
            ce.Undo();
            Assert.IsFalse(effect.Requirements.Contains(req));
            ce.Redo();
            Assert.IsTrue(effect.Requirements.Contains(req));
        }
        public void IRequirementsBean()
        {
            Requirement req    = new Requirement(to.TestCasesStruct, "Req 1");
            Requirement req2   = new Requirement(to.TestCasesStruct, "Req 2");
            Effect      effect = new Effect(to.TestCasesStruct);

            effect.AddRequirement(req2);
            dao.Save();
            to.TestCasesStruct.RemoveRequirement(req);
            dao.DeleteItem(req);
            effect.RemoveRequirement(req2);
            to.TestCasesStruct.RemoveRequirement(req2);
            dao.DeleteItem(req2);
            dao.Save();
            Requirement req3 = dao.GetItem(req2.GetType(), req.Id) as Requirement;

            Assert.IsNull(req3);
        }