public async Task Build_WithLinker_IsIncremental() { // Arrange using var project = ProjectDirectory.Create("standalone", additionalProjects: new[] { "razorclasslibrary" }); var result = await MSBuildProcessManager.DotnetMSBuild(project); Assert.BuildPassed(result); var buildOutputDirectory = project.BuildOutputDirectory; // Act var thumbPrint = FileThumbPrint.CreateFolderThumbprint(project, project.BuildOutputDirectory); // Assert for (var i = 0; i < 3; i++) { result = await MSBuildProcessManager.DotnetMSBuild(project); Assert.BuildPassed(result); var newThumbPrint = FileThumbPrint.CreateFolderThumbprint(project, project.BuildOutputDirectory); Assert.Equal(thumbPrint.Count, newThumbPrint.Count); for (var j = 0; j < thumbPrint.Count; j++) { Assert.Equal(thumbPrint[j], newThumbPrint[j]); } } }
public async Task Build_WithoutLinkerAndCompression_IsIncremental() { // Arrange using var project = ProjectDirectory.Create("standalone", additionalProjects: new[] { "razorclasslibrary" }); var result = await MSBuildProcessManager.DotnetMSBuild(project, args : "/p:BlazorWebAssemblyEnableLinking=false"); Assert.BuildPassed(result); var buildOutputDirectory = project.BuildOutputDirectory; // Act var compressedFilesFolder = Path.Combine(project.IntermediateOutputDirectory, "compressed"); var thumbPrint = FileThumbPrint.CreateFolderThumbprint(project, compressedFilesFolder); // Assert for (var i = 0; i < 3; i++) { result = await MSBuildProcessManager.DotnetMSBuild(project, args : "/p:BlazorWebAssemblyEnableLinking=false"); Assert.BuildPassed(result); var newThumbPrint = FileThumbPrint.CreateFolderThumbprint(project, compressedFilesFolder); Assert.Equal(thumbPrint.Count, newThumbPrint.Count); for (var j = 0; j < thumbPrint.Count; j++) { Assert.Equal(thumbPrint[j], newThumbPrint[j]); } } }