예제 #1
0
        public void NullRemove()
        {
            DialogTree       tree   = m_project.ProjectDialogs.CreateNewDialogTree();
            DialogTreeBranch branch = tree.CreateNewBranch();
            DialogSegment    one    = branch.CreateNewDialog(12);

            // remove existing
            Assert.IsFalse(branch.RemoveDialog((DialogSegment)null));
            Assert.IsFalse(branch.RemoveDialog((DialogSegmentIdentifier)null));
        }
예제 #2
0
        public void NoRemove()
        {
            DialogTree       tree   = m_project.ProjectDialogs.CreateNewDialogTree();
            DialogTreeBranch branch = tree.CreateNewBranch();
            DialogSegment    one    = branch.CreateNewDialog(12);

            Assert.IsTrue(branch.ContainsDialogSegment(one));
            Assert.IsTrue(branch.ContainsDialogSegment(one.Id));

            // remove existing
            Assert.IsTrue(branch.RemoveDialog(one.Id));

            Assert.IsFalse(branch.ContainsDialogSegment(one));
            Assert.IsFalse(branch.ContainsDialogSegment(one.Id));

            // remove not existing
            Assert.IsFalse(branch.RemoveDialog(one));
        }