Ejemplo n.º 1
0
        public void Backup1()
        {
            BuildItemGroup group = new BuildItemGroup(); // virtual group
            XmlElement element = CreatePersistedItemGroupElement();

            BuildItem item1 = CreatePersistedBuildItem(element, "i", "i1");
            BuildItem item2 = CreatePersistedBuildItem(element, "i", "i2");
            group.AddExistingItem(item1);
            group.AddExistingItem(item2);
            BuildItem item3 = group.AddNewItem("j", "j1"); // virtual
            Assertion.AssertEquals(3, group.Count);

            group.RemoveItemWithBackup(item3);
            group.RemoveItemWithBackup(item1);
            Assertion.AssertEquals(1, group.Count);

            group.RemoveAllIntermediateItems();
            Assertion.AssertEquals(2, group.Count);
        }