Skip to content

Commit

Permalink
Merge branch 'dev' into fsharp-projects-tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronontheweb authored Oct 28, 2019
2 parents dc023b8 + 9b1d69d commit ccce374
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ public void Dispose()
[Fact(DisplayName = "List of project imported files should be loaded correctly")]
public void ImportedFilePathIsFound()
{
var sample = ProjectSampleGenerator.GetProjectWithImportSample("SampleProject.csproj");
var projectFilePath = sample.ProjectFile.GetFullPath(Repository.BasePath);
var sample = ProjectSampleGenerator.GetProjectWithImportSample();
var projectName = "SampleProject.csproj";
var projectFilePath = Path.Combine(Repository.BasePath, projectName);
var importedPropsFilePath = Path.Combine(Repository.BasePath, sample.ImportedPropsFile.Name);

Repository
.WriteFile(sample.ProjectFile)
.WriteFile(sample.ImportedPropsFile);
.WriteFile(projectName, sample.ProjectFileContent)
.WriteFile(sample.ImportedPropsFile.Name, sample.ImportedPropsFile.Content);

var projectFile = new SlnFileWithPath(projectFilePath, new SlnFile(FileType.Project, ProjectId.CreateNewId())) ;
var imports = ProjectImportsFinder.FindProjectImports(new[] { projectFile });
Expand All @@ -55,8 +56,8 @@ public async Task Should_mark_project_as_changed_when_only_imported_file_changed
var projectFilePath = sample.ProjectFile.GetFullPath(Repository.BasePath);

Repository
.WriteFile(sample.ProjectFile)
.WriteFile(sample.ImportedPropsFile)
.WriteFile(projectName, sample.ProjectFileContent)
.WriteFile(sample.ImportedPropsFile.Name, sample.ImportedPropsFile.Content)
.Commit("Created sample project")
.CreateBranch("foo")
.CheckoutBranch("foo")
Expand Down
3 changes: 2 additions & 1 deletion src/Incrementalist.Tests/Helpers/ProjectSampleGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public ProjectWithImportSample(SampleFile projectFile, SampleFile importedPropsF
/// Name of the file is not important here
/// </remarks>
public SampleFile ProjectFile { get; }

/// <summary>
/// Imported props file info
/// </summary>
Expand Down Expand Up @@ -88,7 +89,7 @@ public FSharpSampleSolution(SampleFile solutionFile, SampleFile fSharpProjectFil
/// </summary>
public SampleFile CSharpProjectFile { get; }
}

/// <summary>
/// Generated sample file info
/// </summary>
Expand Down

0 comments on commit ccce374

Please sign in to comment.