예제 #1
0
		public void TestRemoveItemAt3 ()
		{
			BuildItemGroup big = new BuildItemGroup ();

			big.AddNewItem ("a", "b");
			big.AddNewItem ("b", "c");
			big.AddNewItem ("c", "d");

			big.RemoveItemAt (3);
		}
예제 #2
0
        public void RemoveItemAtFirstItem()
        {
            BuildItemGroup group = new BuildItemGroup();
            group.AddNewItem("n1", "i1");
            group.AddNewItem("n2", "i2");
            group.AddNewItem("n3", "i3");

            group.RemoveItemAt(0);

            Assertion.AssertEquals(2, group.Count);

            Dictionary<string, string> items = GetDictionaryOfBuildItemsInBuildItemsGroup(group);
            Assertion.AssertEquals("i2", items["n2"]);
            Assertion.AssertEquals("i3", items["n3"]);
        }
예제 #3
0
		public void TestRemoveItemAt1 ()
		{
			BuildItemGroup big = new BuildItemGroup ();

			big.AddNewItem ("a", "b");
			big.AddNewItem ("b", "c");
			big.AddNewItem ("c", "d");

			big.RemoveItemAt (1);

			BuildItem[] items = big.ToArray ();
			Assert.AreEqual (2, big.Count, "A1");
			Assert.AreEqual ("a", items [0].Name, "A2");
			Assert.AreEqual ("c", items [1].Name, "A3");
		}
예제 #4
0
        public void RemoveItemAt1()
        {
            XmlElement ig = CreatePersistedItemGroupElement();
            BuildItemGroup group = new BuildItemGroup(ig, false, new Project());

            BuildItem i2 = group[1];
            group.RemoveItemAt(1);

            Assertion.AssertEquals(1, group.Count);
            Assertion.AssertEquals(1, group.ItemGroupElement.ChildNodes.Count);
            Assertion.AssertEquals("i1", group[0].Include);
            Assertion.AssertEquals(null, i2.ParentPersistedItemGroup);
        }