public void ShouldRestoreLinksOnServiceInitialization()
        {
            MockIVsSolution solution        = new MockIVsSolution();
            MockVsHierarchy sourceHierarchy = new MockVsHierarchy();
            MockVsHierarchy targetHierarchy = new MockVsHierarchy();

            targetHierarchy.GetPropertyProjectValue.Globals.Dictionary["ProjectLinkReference"] =
                sourceHierarchy.GetPropertyProjectIdGuidValue.ToString();

            solution.Hierarchies.Add(sourceHierarchy);
            solution.Hierarchies.Add(targetHierarchy);

            MockSolution dteSolution = new MockSolution();

            dteSolution.Projects.List.Add(sourceHierarchy.GetPropertyProjectValue);
            dteSolution.Projects.List.Add(targetHierarchy.GetPropertyProjectValue);

            ProjectLinkTracker tracker = new ProjectLinkTracker(new MockDocumentTracker(), solution, new MockLogger(), dteSolution);

            List <ProjectLink> links = tracker.GetProjectLinks().ToList();

            Assert.AreEqual(1, links.Count);
            Assert.AreEqual(sourceHierarchy.GetPropertyProjectIdGuidValue, links[0].SourceProjectId);
            Assert.AreEqual(targetHierarchy.GetPropertyProjectIdGuidValue, links[0].TargetProjectId);
        }
        public void ShouldRestoreLinksOnServiceInitialization()
        {
            var solution = new MockIVsSolution();
            var sourceHierarchy = new MockVsHierarchy();
            var targetHierarchy = new MockVsHierarchy();
            targetHierarchy.GetPropertyProjectValue.Globals.Dictionary["ProjectLinkReference"] = sourceHierarchy.GetPropertyProjectIdGuidValue.ToString();

            solution.Hierarchies.Add(sourceHierarchy);
            solution.Hierarchies.Add(targetHierarchy);

            var dteSolution = new MockSolution();
            dteSolution.Projects.List.Add(sourceHierarchy.GetPropertyProjectValue);
            dteSolution.Projects.List.Add(targetHierarchy.GetPropertyProjectValue);

            ProjectLinkTracker tracker = new ProjectLinkTracker(new MockDocumentTracker(), solution, new MockLogger(), dteSolution);

            var links = tracker.GetProjectLinks().ToList();
            Assert.AreEqual(1, links.Count);
            Assert.AreEqual(sourceHierarchy.GetPropertyProjectIdGuidValue, links[0].SourceProjectId);
            Assert.AreEqual(targetHierarchy.GetPropertyProjectIdGuidValue, links[0].TargetProjectId);
        }