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