public void ProjectRepositoryBasics() { var entryPoint = new RepositoryEntryPoint("fake project folder path", _fileIOMock.Object); var serializer = new Mock <IProjectSerializer>(); var loader = new ProjectTreeLoader(entryPoint, serializer.Object, _fileIOMock.Object); }
public ProjectTreeLoader( RepositoryEntryPoint projectRepositoryPath, IProjectSerializer serializer, IFileSystemAccess fileIo) { _projectRepositoryPath = projectRepositoryPath; _serializer = serializer; _fileIO = fileIo; }
public void ProjectRepositoryLoadAllFoldersTest() { var entryPoint = new RepositoryEntryPoint(_topFolder, _fileIOMock.Object); var loader = new ProjectTreeLoader(entryPoint, _serializer, _fileIOMock.Object); var projects = loader.LoadProjects().ToList(); Assert.That(projects.Count, Is.EqualTo(2)); }
public void ProjectRepositoryLoadViaModulesJustOneTest() { var entryPoint = new RepositoryEntryPoint(_topProjectPath, _fileIOMock.Object); var loader = new ProjectTreeLoader(entryPoint, _serializer, _fileIOMock.Object); var projects = loader.LoadProjects().ToList(); Assert.That(projects.Count, Is.EqualTo(1)); }
public void SingleProjectLoadTest() { string projectPath = "fake project path"; var entryPoint = new RepositoryEntryPoint(projectPath, _fileIOMock.Object); var loader = new ProjectTreeLoader(entryPoint, _serializer, _fileIOMock.Object); var container = loader.LoadProjectFile(_topProjectPath); Assert.That(container.Project, Is.Not.Null); Assert.That(container.Project.ArtifactId, Is.EqualTo(_topProject.ArtifactId)); }
public void ProjectRepositoryLoadViaModulesAllTest() { _topProject.Modules.Add(new Module { Path = _secondFolderName }); var content = _serializer.Serialize(_topProject); _fileIOMock.Setup(io => io.ReadAllText(_topProjectPath)).Returns(content); var entryPoint = new RepositoryEntryPoint(_topProjectPath, _fileIOMock.Object); var loader = new ProjectTreeLoader(entryPoint, _serializer, _fileIOMock.Object); var projects = loader.LoadProjects().ToList(); Assert.That(projects.Count, Is.EqualTo(2)); }