private IEnumerable <IReference> GetReferences() { var binaryReferences = _vsProject.GetBinaryReferences(); var projectReferences = _vsProject.GetProjectReferences(); return(binaryReferences.Concat(projectReferences)); }
public void SetUpProjectAdapterAndBinaryDependencies() { _console = new ConsoleMock(); _solutionProjectLoader = new CachingSolutionLoader(Paths.AdapterTestsSolutionFile, new Dictionary<string, string>(), _console.Object); var projectAdapters = _solutionProjectLoader.GetProjects(); _projectWithDependenciesAdapter = projectAdapters.Single(p => p.ProjectName.Equals(ProjectWithDependenciesName, StringComparison.OrdinalIgnoreCase)); _projectBinaryReferenceAdapters = _projectWithDependenciesAdapter.GetBinaryReferences(); }
public void SetUpProjectAdapterAndBinaryDependencies() { _console = new ConsoleMock(); _solutionProjectLoader = new CachingSolutionLoader(Paths.AdapterTestsSolutionFile, new Dictionary <string, string>(), _console.Object); var projectAdapters = _solutionProjectLoader.GetProjects(); _projectWithDependenciesAdapter = projectAdapters.Single(p => p.ProjectName.Equals(ProjectWithDependenciesName, StringComparison.OrdinalIgnoreCase)); _projectBinaryReferenceAdapters = _projectWithDependenciesAdapter.GetBinaryReferences(); }
public void BinaryReferenceSetHintPathCanBeRetrieved() { var binaryDependency = _projectBinaryReferenceAdapters.Single(IsExpectedBinaryDependency); const string nonPersistedHintPath = "a different string that won't be persisted"; binaryDependency.ConvertToNugetReferenceWithHintPath(nonPersistedHintPath); string hintpath; //Don't constrain the implementation to modifying the existing reference var newBinaryDepedency = _projectWithDependenciesAdapter.GetBinaryReferences().Single(IsExpectedBinaryDependency); var hasHintPath = newBinaryDepedency.TryGetHintPath(out hintpath); Assert.That(hasHintPath, Is.True); Assert.That(hintpath, Is.EqualTo(nonPersistedHintPath)); }