diff options
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/TestXmlFixture.cs')
-rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/TestXmlFixture.cs | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestXmlFixture.cs b/src/test/WixToolsetTest.CoreIntegration/TestXmlFixture.cs deleted file mode 100644 index 5330305e..00000000 --- a/src/test/WixToolsetTest.CoreIntegration/TestXmlFixture.cs +++ /dev/null | |||
@@ -1,62 +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 | |||
3 | namespace WixToolsetTest.CoreIntegration | ||
4 | { | ||
5 | using System.Collections.Generic; | ||
6 | using WixToolset.Core.TestPackage; | ||
7 | using Xunit; | ||
8 | |||
9 | public class TestXmlFixture | ||
10 | { | ||
11 | [Fact] | ||
12 | public void ChangesIgnoredAttributesToStarToHelpMakeTestsLessFragile() | ||
13 | { | ||
14 | var original = @"<Top One='f'> | ||
15 | <First Two='t'> | ||
16 | <Target One='a' Two='b' Three='c' /> | ||
17 | </First> | ||
18 | <Target One='z' Two='x' Three = 'y' /> | ||
19 | </Top>"; | ||
20 | var expected = "<Top One='f'><First Two='t'><Target One='*' Two='*' Three='c' /></First><Target One='*' Two='*' Three='y' /></Top>"; | ||
21 | var ignored = new Dictionary<string, List<string>> { { "Target", new List<string> { "One", "Two", "Missing" } } }; | ||
22 | Assert.Equal(expected, original.GetTestXml(ignored)); | ||
23 | } | ||
24 | |||
25 | [Fact] | ||
26 | public void OutputsSingleQuotesSinceDoubleQuotesInCsharpLiteralStringsArePainful() | ||
27 | { | ||
28 | var original = "<Test Simple=\"\" EscapedDoubleQuote=\""\" SingleQuoteValue=\"'test'\" Alternating='\"' AlternatingEscaped='"' />"; | ||
29 | var expected = "<Test Simple='' EscapedDoubleQuote='\"' SingleQuoteValue=''test'' Alternating='\"' AlternatingEscaped='\"' />"; | ||
30 | Assert.Equal(expected, original.GetTestXml()); | ||
31 | } | ||
32 | |||
33 | [Fact] | ||
34 | public void RemovesAllNamespacesToReduceTyping() | ||
35 | { | ||
36 | var original = "<Test xmlns='a'><Child xmlns:b='b'><Grandchild xmlns:c='c' /><Grandchild /></Child></Test>"; | ||
37 | var expected = "<Test><Child><Grandchild /><Grandchild /></Child></Test>"; | ||
38 | Assert.Equal(expected, original.GetTestXml()); | ||
39 | } | ||
40 | |||
41 | [Fact] | ||
42 | public void RemovesUnnecessaryWhitespaceToAvoidLineEndingIssues() | ||
43 | { | ||
44 | var original = @"<Test> | ||
45 | <Child> | ||
46 | <Grandchild /> | ||
47 | <Grandchild /> | ||
48 | </Child> | ||
49 | </Test>"; | ||
50 | var expected = "<Test><Child><Grandchild /><Grandchild /></Child></Test>"; | ||
51 | Assert.Equal(expected, original.GetTestXml()); | ||
52 | } | ||
53 | |||
54 | [Fact] | ||
55 | public void RemovesXmlDeclarationToReduceTyping() | ||
56 | { | ||
57 | var original = "<?xml version='1.0'?><Test />"; | ||
58 | var expected = "<Test />"; | ||
59 | Assert.Equal(expected, original.GetTestXml()); | ||
60 | } | ||
61 | } | ||
62 | } | ||