コード例 #1
0
            public void WhenSolutionIsOpened_ThenIsOpenReturnsTrue()
            {
                var solution  = ServiceProvider.GetService <IVsSolution>();
                var hierarchy = solution as IVsHierarchy;

                var solutionNode = new SolutionNode(
                    new VsSolutionHierarchyNode(hierarchy, VSConstants.VSITEMID_ROOT),
                    Mock.Of <ITreeNodeFactory <IVsSolutionHierarchyNode> >(),
                    Mock.Of <ISolutionExplorerNodeFactory>(),
                    Mock.Of <IServiceLocator>(),
                    Mock.Of <IAdapterService>(),
                    Mock.Of <ISolutionEvents>(),
                    Mock.Of <IUIThread>());

                solutionNode.Open(GetFullPath(TestContext.TestDeploymentDir, "SampleSolution\\SampleSolution.sln"));

                Assert.True(solutionNode.IsOpen);
            }
コード例 #2
0
			public void WhenSolutionIsOpened_ThenIsOpenReturnsTrue()
			{
				var solution = ServiceProvider.GetService<IVsSolution>();
				var hierarchy = solution as IVsHierarchy;

				var solutionNode = new SolutionNode(
                    new VsSolutionHierarchyNode(hierarchy, VSConstants.VSITEMID_ROOT),
                    Mock.Of<ITreeNodeFactory<IVsSolutionHierarchyNode>>(),
                    Mock.Of<ISolutionExplorerNodeFactory>(),
                    Mock.Of<IServiceLocator>(),
                    Mock.Of<IAdapterService>(),
					Mock.Of<ISolutionEvents>(),
                    Mock.Of<IUIThread>());

				solutionNode.Open(GetFullPath(TestContext.TestDeploymentDir, "SampleSolution\\SampleSolution.sln"));

				Assert.True(solutionNode.IsOpen);
			}