6 writes to Log
Microsoft.Build.Tasks.UnitTests (6)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (1)
3064
e.
Log
= "";
MakeDir_Tests.cs (3)
154
engine.
Log
= "";
203
engine.
Log
= "";
212
engine.
Log
= "";
Unzip_Tests.cs (1)
75
_mockEngine.
Log
= string.Empty;
XslTransformation_Tests.cs (1)
247
engine.
Log
= "";
209 references to Log
Microsoft.Build.Tasks.UnitTests (208)
AssemblyDependency\SuggestedRedirects.cs (1)
119
engine.
Log
);
Copy_Tests.cs (1)
3210
string log = engine.
Log
;
CreateCSharpManifestResourceName_Tests.cs (1)
766
m.
Log
);
DownloadFile_Tests.cs (19)
180
downloadFile.Execute().ShouldBeFalse(_mockEngine.
Log
);
182
_mockEngine.
Log
.ShouldContain("MSB3921");
196
downloadFile.Execute().ShouldBeFalse(_mockEngine.
Log
);
198
_mockEngine.
Log
.ShouldContain("Response status code does not indicate success: 404 (Not Found).");
236
downloadFile.Execute().ShouldBeTrue(_mockEngine.
Log
);
238
_mockEngine.
Log
.ShouldContain("MSB3924", customMessage: _mockEngine.
Log
);
255
downloadFile.Execute().ShouldBeFalse(_mockEngine.
Log
);
257
_mockEngine.
Log
.ShouldContain("MSB3924", customMessage: _mockEngine.
Log
);
279
downloadFile.Execute().ShouldBeFalse(_mockEngine.
Log
);
281
_mockEngine.
Log
.ShouldContain("MSB3923", customMessage: _mockEngine.
Log
);
318
result.ShouldBeFalse(_mockEngine.
Log
);
352
_mockEngine.
Log
.ShouldContain("Did not download file from \"http://success/foo.txt\"", customMessage: _mockEngine.
Log
);
371
downloadFile.Execute().ShouldBeFalse(_mockEngine.
Log
);
373
_mockEngine.
Log
.ShouldContain("MSB3922", customMessage: _mockEngine.
Log
);
Exec_Tests.cs (5)
674
Console.WriteLine(e.
Log
);
696
Console.WriteLine(e.
Log
);
705
Console.WriteLine(e.
Log
);
727
Console.WriteLine(e.
Log
);
737
Console.WriteLine(e.
Log
);
FindInList_Tests.cs (1)
133
Console.WriteLine(e.
Log
);
GetFileHash_Tests.cs (3)
36
_mockEngine.
Log
.ShouldContain("MSB3953");
50
_mockEngine.
Log
.ShouldContain("MSB3951");
63
_mockEngine.
Log
.ShouldContain("MSB3954");
MakeDir_Tests.cs (8)
47
engine.
Log
);
110
engine.
Log
);
152
engine.
Log
);
163
engine.
Log
);
199
engine.
Log
);
222
engine.
Log
);
260
Assert.Contains("MSB3191", engine.
Log
);
261
Assert.Contains(file, engine.
Log
);
ResolveSDKReference_Tests.cs (1)
384
Assert.Equal(0, engine.
Log
.Length);
ResourceHandling\GenerateResource_Tests.cs (7)
1913
string log = ((MockEngine)t.BuildEngine).
Log
;
4026
((MockEngine)t.BuildEngine).
Log
);
4055
Assert.Matches(sb.ToString(), ((MockEngine)t.BuildEngine).
Log
);
4059
Assert.Contains(unformattedMessage, ((MockEngine)t.BuildEngine).
Log
);
4068
Assert.Contains(message, ((MockEngine)t.BuildEngine).
Log
);
4076
Assert.DoesNotContain(String.Format(AssemblyResources.GetString(messageID), replacements), ((MockEngine)t.BuildEngine).
Log
);
4084
Assert.DoesNotContain(message, ((MockEngine)t.BuildEngine).
Log
);
RoslynCodeTaskFactory_Tests.cs (6)
262
initialized.ShouldBeTrue(firstEngine.
Log
);
280
initializedAgain.ShouldBeTrue(secondEngine.
Log
);
983
buildEngine.
Log
.ShouldContain(expectedErrorMessage, customMessage: buildEngine.
Log
);
1005
buildEngine.Errors.ShouldBe(0, buildEngine.
Log
);
1013
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
);
93
Assert.DoesNotContain("EE2493A167D24F00996DE7C8E769EAE6", engine.
Log
);
96
Assert.Contains("4ADE3D2622CA400B8B95A039DF540037", engine.
Log
);
Touch_Tests.cs (11)
205
engine.
Log
);
228
engine.
Log
);
252
engine.
Log
);
276
Assert.Contains("MSB3376", engine.
Log
);
298
Assert.Contains("MSB3374", engine.
Log
);
299
Assert.Contains(myreadonly_txt, engine.
Log
);
339
Assert.Contains("MSB3371", engine.
Log
);
340
Assert.Contains(nonexisting_txt, engine.
Log
);
367
engine.
Log
);
393
engine.
Log
);
418
engine.
Log
);
Unzip_Tests.cs (67)
45
unzip.Execute().ShouldBeTrue(_mockEngine.
Log
);
47
_mockEngine.
Log
.ShouldContain("638AF4AE88A146E09CB69FE1CA7083DC", customMessage: _mockEngine.
Log
);
74
unzip.Execute().ShouldBeFalse(_mockEngine.
Log
);
88
unzip2.Execute().ShouldBeTrue(_mockEngine.
Log
);
90
_mockEngine.
Log
.ShouldContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.
Log
);
91
_mockEngine.
Log
.ShouldContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.
Log
);
104
unzip3.Execute().ShouldBeTrue(_mockEngine.
Log
);
134
unzip.Execute().ShouldBeTrue(customMessage: _mockEngine.
Log
);
136
_mockEngine.
Log
.ShouldContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.
Log
);
137
_mockEngine.
Log
.ShouldContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.
Log
);
138
_mockEngine.
Log
.ShouldContain(Path.Combine(destination.Path, "subdir", "F83E9633685494E53BEF3794EDEEE6A6.txt"), customMessage: _mockEngine.
Log
);
139
_mockEngine.
Log
.ShouldContain(Path.Combine(destination.Path, "subdir", "21D6D4596067723B3AC5DF9A8B3CBFE7.txt"), customMessage: _mockEngine.
Log
);
154
unzip.Execute().ShouldBeFalse(_mockEngine.
Log
);
156
_mockEngine.
Log
.ShouldContain("MSB3931", customMessage: _mockEngine.
Log
);
209
unzip.Execute().ShouldBeFalse(_mockEngine.
Log
);
211
_mockEngine.
Log
.ShouldContain("D6DFD219DACE48F8B86EFCDF98433333.txt' is denied", customMessage: _mockEngine.
Log
);
232
unzip.Execute().ShouldBeFalse(_mockEngine.
Log
);
234
_mockEngine.
Log
.ShouldContain("MSB3933", customMessage: _mockEngine.
Log
);
253
unzip.Execute().ShouldBeFalse(_mockEngine.
Log
);
255
_mockEngine.
Log
.ShouldContain("MSB3932", customMessage: _mockEngine.
Log
);
282
unzip.Execute().ShouldBeTrue(_mockEngine.
Log
);
284
_mockEngine.
Log
.ShouldContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.
Log
);
285
_mockEngine.
Log
.ShouldNotContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.
Log
);
312
unzip.Execute().ShouldBeTrue(_mockEngine.
Log
);
314
_mockEngine.
Log
.ShouldNotContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.
Log
);
315
_mockEngine.
Log
.ShouldContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.
Log
);
347
unzip.Execute().ShouldBeTrue(_mockEngine.
Log
);
349
_mockEngine.
Log
.ShouldContain(Path.Combine(destination.Path, "file1.js"), customMessage: _mockEngine.
Log
);
350
_mockEngine.
Log
.ShouldNotContain(Path.Combine(destination.Path, "file1.js.map"), customMessage: _mockEngine.
Log
);
351
_mockEngine.
Log
.ShouldContain(Path.Combine(destination.Path, "file2.js"), customMessage: _mockEngine.
Log
);
352
_mockEngine.
Log
.ShouldNotContain(Path.Combine(destination.Path, "readme.txt"), customMessage: _mockEngine.
Log
);
353
_mockEngine.
Log
.ShouldNotContain(Path.Combine(destination.Path, "sub", "subfile.js"), customMessage: _mockEngine.
Log
);
380
unzip.Execute().ShouldBeFalse(_mockEngine.
Log
);
382
_mockEngine.
Log
.ShouldContain("MSB3937", customMessage: _mockEngine.
Log
);
409
unzip.Execute().ShouldBeFalse(_mockEngine.
Log
);
411
_mockEngine.
Log
.ShouldContain("MSB3938", customMessage: _mockEngine.
Log
);
438
unzip.Execute().ShouldBeFalse(_mockEngine.
Log
);
440
_mockEngine.
Log
.ShouldContain("MSB3937", customMessage: _mockEngine.
Log
);
467
unzip.Execute().ShouldBeFalse(_mockEngine.
Log
);
469
_mockEngine.
Log
.ShouldContain("MSB3938", customMessage: _mockEngine.
Log
);
500
unzip.Execute().ShouldBeTrue(_mockEngine.
Log
);
502
_mockEngine.
Log
.ShouldContain(unzippedFilePath, customMessage: _mockEngine.
Log
);
VerifyFileHash_Tests.cs (1)
96
task.Execute().ShouldBeFalse(_mockEngine.
Log
);
WriteCodeFragment_Tests.cs (3)
452
result.ShouldBeTrue(engine.
Log
);
1200
Assert.True(result, engine.
Log
);
1234
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)
364
Assert.True(p.Execute(), engine.
Log
);
XslTransformation_Tests.cs (35)
196
Console.WriteLine(engine.
Log
);
197
Assert.Contains("MSB3701", engine.
Log
); // "The output should contain MSB3701 error message at missing Xsl params test"
245
Console.WriteLine(engine.
Log
);
246
Assert.Contains("MSB3701", engine.
Log
); // "The output should contain MSB3701 error message at missing Xml params test"
276
Console.WriteLine(engine.
Log
);
277
Assert.Contains("MSB3701", engine.
Log
); // "The output should contain MSB3701 error message"
310
Console.WriteLine(engine.
Log
);
311
Assert.Contains("MSB3701", engine.
Log
);
344
Console.WriteLine(engine.
Log
);
345
Assert.Contains("MSB3701", engine.
Log
); // "The output should contain MSB3701 error message at no params test"
375
Assert.Equal(String.Empty, engine.
Log
); // "The log should be empty"
376
Console.WriteLine(engine.
Log
);
413
Console.WriteLine(engine.
Log
);
462
Console.WriteLine(engine.
Log
);
503
Console.WriteLine(engine.
Log
);
590
Console.WriteLine(engine.
Log
);
626
Console.WriteLine(engine.
Log
);
653
Console.WriteLine(engine.
Log
);
655
Assert.Contains("MSB3703", engine.
Log
);
683
Console.WriteLine(engine.
Log
);
684
Assert.Contains("MSB3704", engine.
Log
);
741
Console.WriteLine(engine.
Log
);
774
Console.WriteLine(engine.
Log
);
839
Console.WriteLine(engine.
Log
);
881
Console.WriteLine(engine.
Log
);
969
Assert.True(t.Execute(), "CompiledDllWithTwoTypes execution should've passed" + engine.
Log
);
970
Console.WriteLine(engine.
Log
);
981
System.Diagnostics.Debug.WriteLine(engine.
Log
);
1020
Assert.False(t.Execute(), "CompiledDllWithTwoTypes execution should've failed" + engine.
Log
);
1022
System.Diagnostics.Debug.WriteLine(engine.
Log
);
1032
Assert.False(t.Execute(), "CompiledDllWithTwoTypes execution should've failed" + engine.
Log
);
1033
Console.WriteLine(engine.
Log
);
1035
System.Diagnostics.Debug.WriteLine(engine.
Log
);
1091
engine.
Log
.ShouldContain("MSB3703"); // "The log should contain MSB3703 error message at XslDocumentFunctionWorks test"
1321
engine.
Log
.ShouldContain("MSB3703"); // Should contain transformation error code
ZipDirectory_Tests.cs (24)
58
zipDirectory.Execute().ShouldBeTrue(_mockEngine.
Log
);
60
_mockEngine.
Log
.ShouldContain(sourceFolder.Path, customMessage: _mockEngine.
Log
);
61
_mockEngine.
Log
.ShouldContain(zipFilePath, customMessage: _mockEngine.
Log
);
65
_mockEngine.
Log
.ShouldContain("MSB3944", customMessage: _mockEngine.
Log
);
69
_mockEngine.
Log
.ShouldContain("MSB3945", customMessage: _mockEngine.
Log
);
76
_mockEngine.
Log
.ShouldNotContain("MSB394", customMessage: _mockEngine.
Log
); // Prefix
77
_mockEngine.
Log
.ShouldNotContain("MSB3950", customMessage: _mockEngine.
Log
);
117
zipDirectory.Execute().ShouldBeTrue(_mockEngine.
Log
);
119
_mockEngine.
Log
.ShouldContain(sourceFolder.Path, customMessage: _mockEngine.
Log
);
120
_mockEngine.
Log
.ShouldContain(file.Path, customMessage: _mockEngine.
Log
);
155
zipDirectory.Execute().ShouldBeFalse(_mockEngine.
Log
);
157
_mockEngine.
Log
.ShouldContain("MSB3942", customMessage: _mockEngine.
Log
);
171
zipDirectory.Execute().ShouldBeFalse(_mockEngine.
Log
);
173
_mockEngine.
Log
.ShouldContain("MSB3941", customMessage: _mockEngine.
Log
);
Microsoft.Build.Utilities.UnitTests (1)
ToolTask_Tests.cs (1)
274
string log = engine.
Log
;