コード例 #1
0
        public VsSolutionTestCoverage(Workspace myWorkspace,
            ISolutionCoverageEngine solutionCoverageEngine,
            ICoverageStore coverageStore)
        {
            MyWorkspace = myWorkspace;
            _solutionCoverageEngine = solutionCoverageEngine;
            _coverageStore = coverageStore;

            SolutionCoverageByDocument = new Dictionary<string, List<LineCoverage>>();
        }
コード例 #2
0
        public void Setup()
        {
            _solutionCoverageEngineMock = Substitute.For<ISolutionCoverageEngine>();
            _coverageStoreMock = Substitute.For<ICoverageStore>();

            Workspace workspace = new AdhocWorkspace();
            _sut = new VsSolutionTestCoverage(workspace,
                _solutionCoverageEngineMock,
                _coverageStoreMock);
        }
コード例 #3
0
        public static VsSolutionTestCoverage CreateInstanceIfDoesNotExist(Workspace myWorkspace,
            ISolutionCoverageEngine solutionCoverageEngine,
            ICoverageStore coverageStore)
        {
            if (_vsSolutionTestCoverage == null)
            {
                lock (SyncObject)
                {
                    if (_vsSolutionTestCoverage == null)
                    {
                        _vsSolutionTestCoverage = new VsSolutionTestCoverage(myWorkspace, solutionCoverageEngine, coverageStore);
                        _vsSolutionTestCoverage.Reinit();
                        _vsSolutionTestCoverage.LoadCurrentCoverage();
                    }
                }
            }

            return _vsSolutionTestCoverage;
        }