public VsSolutionTestCoverage(Workspace myWorkspace, ISolutionCoverageEngine solutionCoverageEngine, ICoverageStore coverageStore) { MyWorkspace = myWorkspace; _solutionCoverageEngine = solutionCoverageEngine; _coverageStore = coverageStore; SolutionCoverageByDocument = new Dictionary<string, List<LineCoverage>>(); }
public void Setup() { _solutionCoverageEngineMock = Substitute.For<ISolutionCoverageEngine>(); _coverageStoreMock = Substitute.For<ICoverageStore>(); Workspace workspace = new AdhocWorkspace(); _sut = new VsSolutionTestCoverage(workspace, _solutionCoverageEngineMock, _coverageStoreMock); }
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; }