Пример #1
0
        public void TestRemoveLink()
        {
            var underTest = new Project();
            var itemKind = "test";

            var item1 = new ProjectItem("p1", itemKind);
            var item2 = new ProjectItem("p2", itemKind);

            underTest.AddItem(item1);
            underTest.AddItem(item2);

            var link = new ProjectItemLinkDescription("desc");
            underTest.AddLink(item1, link, item2);

            underTest.RemoveLink(item1, link, item2);

            AssertEmptyLinkList(item1);
            AssertEmptyLinkList(item2);
        }
Пример #2
0
        public void TestAddLink()
        {
            var underTest = new Project();
            var itemKind = "test";

            var item1 = new ProjectItem("p1", itemKind);
            var item2 = new ProjectItem("p2", itemKind);

            underTest.AddItem(item1);
            underTest.AddItem(item2);

            var link = new ProjectItemLinkDescription("desc");
            underTest.AddLink(item1, link, item2);

            AssertLinkedItem(item1, item2, link);
            AssertLinkedItem(item2, item1, link);
        }