6 writes to Log
Microsoft.Build.Tasks.UnitTests (6)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (1)
3064e.Log = "";
MakeDir_Tests.cs (3)
152engine.Log = ""; 200engine.Log = ""; 208engine.Log = "";
Unzip_Tests.cs (1)
75_mockEngine.Log = string.Empty;
XslTransformation_Tests.cs (1)
246engine.Log = "";
194 references to Log
Microsoft.Build.Tasks.UnitTests (193)
AssemblyDependency\SuggestedRedirects.cs (1)
121engine.Log);
CreateCSharpManifestResourceName_Tests.cs (1)
767m.Log);
DownloadFile_Tests.cs (19)
175downloadFile.Execute().ShouldBeFalse(_mockEngine.Log); 177_mockEngine.Log.ShouldContain("MSB3921"); 190downloadFile.Execute().ShouldBeFalse(_mockEngine.Log); 192_mockEngine.Log.ShouldContain("Response status code does not indicate success: 404 (Not Found)."); 229downloadFile.Execute().ShouldBeTrue(_mockEngine.Log); 231_mockEngine.Log.ShouldContain("MSB3924", customMessage: _mockEngine.Log); 247downloadFile.Execute().ShouldBeFalse(_mockEngine.Log); 249_mockEngine.Log.ShouldContain("MSB3924", customMessage: _mockEngine.Log); 270downloadFile.Execute().ShouldBeFalse(_mockEngine.Log); 272_mockEngine.Log.ShouldContain("MSB3923", customMessage: _mockEngine.Log); 309result.ShouldBeFalse(_mockEngine.Log); 342_mockEngine.Log.ShouldContain("Did not download file from \"http://success/foo.txt\"", customMessage: _mockEngine.Log); 360downloadFile.Execute().ShouldBeFalse(_mockEngine.Log); 362_mockEngine.Log.ShouldContain("MSB3922", customMessage: _mockEngine.Log);
Exec_Tests.cs (5)
654Console.WriteLine(e.Log); 676Console.WriteLine(e.Log); 685Console.WriteLine(e.Log); 707Console.WriteLine(e.Log); 717Console.WriteLine(e.Log);
FindInList_Tests.cs (1)
133Console.WriteLine(e.Log);
GetFileHash_Tests.cs (3)
36_mockEngine.Log.ShouldContain("MSB3953"); 49_mockEngine.Log.ShouldContain("MSB3951"); 61_mockEngine.Log.ShouldContain("MSB3954");
MakeDir_Tests.cs (8)
47engine.Log); 109engine.Log); 150engine.Log); 161engine.Log); 196engine.Log); 218engine.Log); 255Assert.Contains("MSB3191", engine.Log); 256Assert.Contains(file, engine.Log);
ResolveSDKReference_Tests.cs (1)
385Assert.Equal(0, engine.Log.Length);
ResourceHandling\GenerateResource_Tests.cs (6)
3759((MockEngine)t.BuildEngine).Log); 3788Assert.Matches(sb.ToString(), ((MockEngine)t.BuildEngine).Log); 3792Assert.Contains(unformattedMessage, ((MockEngine)t.BuildEngine).Log); 3801Assert.Contains(message, ((MockEngine)t.BuildEngine).Log); 3809Assert.DoesNotContain(String.Format(AssemblyResources.GetString(messageID), replacements), ((MockEngine)t.BuildEngine).Log); 3817Assert.DoesNotContain(message, ((MockEngine)t.BuildEngine).Log);
RoslynCodeTaskFactory_Tests.cs (4)
787buildEngine.Log.ShouldContain(expectedErrorMessage, customMessage: buildEngine.Log); 809buildEngine.Errors.ShouldBe(0, buildEngine.Log); 817string output = buildEngine.Log;
TelemetryTaskTests.cs (6)
28Assert.Contains(telemetryTask.EventName, engine.Log); 50Assert.Contains(propertyName, engine.Log); 52Assert.Contains(propertyValue, engine.Log); 70Assert.Contains($"The property \"Property2\" in the telemetry event data property list \"{telemetryTask.EventData}\" is malformed.", engine.Log); 94Assert.DoesNotContain("EE2493A167D24F00996DE7C8E769EAE6", engine.Log); 98Assert.Contains("4ADE3D2622CA400B8B95A039DF540037", engine.Log);
Touch_Tests.cs (11)
204engine.Log); 226engine.Log); 249engine.Log); 272Assert.Contains("MSB3376", engine.Log); 293Assert.Contains("MSB3374", engine.Log); 294Assert.Contains(myreadonly_txt, engine.Log); 332Assert.Contains("MSB3371", engine.Log); 333Assert.Contains(nonexisting_txt, engine.Log); 359engine.Log); 384engine.Log); 408engine.Log);
Unzip_Tests.cs (67)
46unzip.Execute().ShouldBeTrue(_mockEngine.Log); 48_mockEngine.Log.ShouldContain("638AF4AE88A146E09CB69FE1CA7083DC", customMessage: _mockEngine.Log); 74unzip.Execute().ShouldBeFalse(_mockEngine.Log); 87unzip2.Execute().ShouldBeTrue(_mockEngine.Log); 89_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log); 90_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log); 102unzip3.Execute().ShouldBeTrue(_mockEngine.Log); 131unzip.Execute().ShouldBeTrue(customMessage: _mockEngine.Log); 133_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log); 134_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log); 135_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "subdir", "F83E9633685494E53BEF3794EDEEE6A6.txt"), customMessage: _mockEngine.Log); 136_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "subdir", "21D6D4596067723B3AC5DF9A8B3CBFE7.txt"), customMessage: _mockEngine.Log); 150unzip.Execute().ShouldBeFalse(_mockEngine.Log); 152_mockEngine.Log.ShouldContain("MSB3931", customMessage: _mockEngine.Log); 199unzip.Execute().ShouldBeFalse(_mockEngine.Log); 201_mockEngine.Log.ShouldContain("D6DFD219DACE48F8B86EFCDF98433333.txt' is denied", customMessage: _mockEngine.Log); 221unzip.Execute().ShouldBeFalse(_mockEngine.Log); 223_mockEngine.Log.ShouldContain("MSB3933", customMessage: _mockEngine.Log); 241unzip.Execute().ShouldBeFalse(_mockEngine.Log); 243_mockEngine.Log.ShouldContain("MSB3932", customMessage: _mockEngine.Log); 269unzip.Execute().ShouldBeTrue(_mockEngine.Log); 271_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log); 272_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log); 298unzip.Execute().ShouldBeTrue(_mockEngine.Log); 300_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log); 301_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log); 332unzip.Execute().ShouldBeTrue(_mockEngine.Log); 334_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "file1.js"), customMessage: _mockEngine.Log); 335_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "file1.js.map"), customMessage: _mockEngine.Log); 336_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "file2.js"), customMessage: _mockEngine.Log); 337_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "readme.txt"), customMessage: _mockEngine.Log); 338_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "sub", "subfile.js"), customMessage: _mockEngine.Log); 364unzip.Execute().ShouldBeFalse(_mockEngine.Log); 366_mockEngine.Log.ShouldContain("MSB3937", customMessage: _mockEngine.Log); 392unzip.Execute().ShouldBeFalse(_mockEngine.Log); 394_mockEngine.Log.ShouldContain("MSB3938", customMessage: _mockEngine.Log); 420unzip.Execute().ShouldBeFalse(_mockEngine.Log); 422_mockEngine.Log.ShouldContain("MSB3937", customMessage: _mockEngine.Log); 448unzip.Execute().ShouldBeFalse(_mockEngine.Log); 450_mockEngine.Log.ShouldContain("MSB3938", customMessage: _mockEngine.Log); 480unzip.Execute().ShouldBeTrue(_mockEngine.Log); 482_mockEngine.Log.ShouldContain(unzippedFilePath, customMessage: _mockEngine.Log);
VerifyFileHash_Tests.cs (1)
93task.Execute().ShouldBeFalse(_mockEngine.Log);
WriteCodeFragment_Tests.cs (2)
1103Assert.True(result, engine.Log); 1137Assert.False(result, engine.Log);
XmlPeek_Tests.cs (7)
205Assert.Contains("MSB3741", engine.Log); // "Error message MSB3741 should fire" 222Assert.Contains("MSB3741", engine.Log); // "Error message MSB3741 should fire" 239Assert.Contains("MSB3743", engine.Log); // "Engine log should contain error code MSB3743" 257Assert.Contains("MSB3733", engine.Log); // "Engine log should contain error code MSB3733" 274Assert.True(engine.Log.Contains("MSB3742"), "Engine Log: " + engine.Log); 303Console.WriteLine(engine.Log);
XmlPoke_Tests.cs (1)
361Assert.True(p.Execute(), engine.Log);
XslTransformation_Tests.cs (33)
195Console.WriteLine(engine.Log); 196Assert.Contains("MSB3701", engine.Log); // "The output should contain MSB3701 error message at missing Xsl params test" 244Console.WriteLine(engine.Log); 245Assert.Contains("MSB3701", engine.Log); // "The output should contain MSB3701 error message at missing Xml params test" 275Console.WriteLine(engine.Log); 276Assert.Contains("MSB3701", engine.Log); // "The output should contain MSB3701 error message" 309Console.WriteLine(engine.Log); 310Assert.Contains("MSB3701", engine.Log); 343Console.WriteLine(engine.Log); 344Assert.Contains("MSB3701", engine.Log); // "The output should contain MSB3701 error message at no params test" 374Assert.Equal(String.Empty, engine.Log); // "The log should be empty" 375Console.WriteLine(engine.Log); 412Console.WriteLine(engine.Log); 461Console.WriteLine(engine.Log); 502Console.WriteLine(engine.Log); 589Console.WriteLine(engine.Log); 625Console.WriteLine(engine.Log); 652Console.WriteLine(engine.Log); 654Assert.Contains("MSB3703", engine.Log); 682Console.WriteLine(engine.Log); 683Assert.Contains("MSB3704", engine.Log); 740Console.WriteLine(engine.Log); 773Console.WriteLine(engine.Log); 838Console.WriteLine(engine.Log); 880Console.WriteLine(engine.Log); 968Assert.True(t.Execute(), "CompiledDllWithTwoTypes execution should've passed" + engine.Log); 969Console.WriteLine(engine.Log); 980System.Diagnostics.Debug.WriteLine(engine.Log); 1019Assert.False(t.Execute(), "CompiledDllWithTwoTypes execution should've failed" + engine.Log); 1021System.Diagnostics.Debug.WriteLine(engine.Log); 1031Assert.False(t.Execute(), "CompiledDllWithTwoTypes execution should've failed" + engine.Log); 1032Console.WriteLine(engine.Log); 1034System.Diagnostics.Debug.WriteLine(engine.Log);
ZipDirectory_Tests.cs (16)
41zipDirectory.Execute().ShouldBeTrue(_mockEngine.Log); 43_mockEngine.Log.ShouldContain(sourceFolder.Path, customMessage: _mockEngine.Log); 44_mockEngine.Log.ShouldContain(zipFilePath, customMessage: _mockEngine.Log); 83zipDirectory.Execute().ShouldBeTrue(_mockEngine.Log); 85_mockEngine.Log.ShouldContain(sourceFolder.Path, customMessage: _mockEngine.Log); 86_mockEngine.Log.ShouldContain(file.Path, customMessage: _mockEngine.Log); 121zipDirectory.Execute().ShouldBeFalse(_mockEngine.Log); 123_mockEngine.Log.ShouldContain("MSB3942", customMessage: _mockEngine.Log); 136zipDirectory.Execute().ShouldBeFalse(_mockEngine.Log); 138_mockEngine.Log.ShouldContain("MSB3941", customMessage: _mockEngine.Log);
Microsoft.Build.Utilities.UnitTests (1)
ToolTask_Tests.cs (1)
271string log = engine.Log;