aboutsummaryrefslogtreecommitdiff
path: root/src/test/WixToolsetTest.CoreIntegration/WarningFixture.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/WarningFixture.cs')
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/WarningFixture.cs63
1 files changed, 0 insertions, 63 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/WarningFixture.cs b/src/test/WixToolsetTest.CoreIntegration/WarningFixture.cs
deleted file mode 100644
index c5b6c261..00000000
--- a/src/test/WixToolsetTest.CoreIntegration/WarningFixture.cs
+++ /dev/null
@@ -1,63 +0,0 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3namespace WixToolsetTest.CoreIntegration
4{
5 using System.IO;
6 using WixBuildTools.TestSupport;
7 using WixToolset.Core.TestPackage;
8 using WixToolset.Data;
9 using Xunit;
10
11 public class WarningFixture
12 {
13 [Fact]
14 public void SuppressedWarningsWithWarningAsErrorsAreNotErrors()
15 {
16 var folder = TestData.Get(@"TestData\Payload");
17
18 using (var fs = new DisposableFileSystem())
19 {
20 var baseFolder = fs.GetFolder();
21 var intermediateFolder = Path.Combine(baseFolder, "obj");
22 var wixlibPath = Path.Combine(intermediateFolder, @"test.wixlib");
23
24 var result = WixRunner.Execute(warningsAsErrors: true, new[]
25 {
26 "build",
27 "-sw1152",
28 Path.Combine(folder, "CanonicalizeName.wxs"),
29 "-intermediateFolder", intermediateFolder,
30 "-o", wixlibPath,
31 });
32
33 result.AssertSuccess();
34 }
35 }
36
37 [Fact]
38 public void WarningsAsErrorsTreatsWarningsAsErrors()
39 {
40 var folder = TestData.Get(@"TestData\Payload");
41
42 using (var fs = new DisposableFileSystem())
43 {
44 var baseFolder = fs.GetFolder();
45 var intermediateFolder = Path.Combine(baseFolder, "obj");
46 var wixlibPath = Path.Combine(intermediateFolder, @"test.wixlib");
47
48 var result = WixRunner.Execute(warningsAsErrors: true, new[]
49 {
50 "build",
51 Path.Combine(folder, "CanonicalizeName.wxs"),
52 "-intermediateFolder", intermediateFolder,
53 "-o", wixlibPath,
54 });
55
56 Assert.Equal((int)WarningMessages.Ids.PathCanonicalized, result.ExitCode);
57
58 var message = Assert.Single(result.Messages);
59 Assert.Equal(MessageLevel.Warning, message.Level); // TODO: is this right?
60 }
61 }
62 }
63}