Skip to content

Commit 60f154e

Browse files
committed
Bytecode Tests - fix code formatting on old test
This also switches to use the `LoadToTempFile` fixture helper instead of manually getting a temp path and loading the file.
1 parent 675ed94 commit 60f154e

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

src/Xamarin.Android.Tools.Bytecode/Tests/ParameterFixupTests.cs

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,22 @@ public void XmlDeclaration_FixedUpFromDocumentation()
3030
}
3131

3232
[Test]
33-
public void XmlDeclaration_FixedUpFromApiXmlDocumentation()
33+
public void XmlDeclaration_FixedUpFromApiXmlDocumentation ()
3434
{
3535
string tempFile = null;
3636

37-
try
38-
{
39-
tempFile = Path.GetTempFileName();
40-
File.WriteAllText(tempFile, LoadString("ParameterFixupApiXmlDocs.xml"));
37+
try {
38+
tempFile = LoadToTempFile ("ParameterFixupApiXmlDocs.xml");
4139

42-
AssertXmlDeclaration("Collection.class", "ParameterFixupFromDocs.xml", tempFile, Bytecode.JavaDocletType._ApiXml);
43-
}
44-
catch (Exception ex)
45-
{
46-
try
47-
{
48-
if (File.Exists(tempFile))
49-
File.Delete(tempFile);
40+
AssertXmlDeclaration ("Collection.class", "ParameterFixupFromDocs.xml", tempFile, Bytecode.JavaDocletType._ApiXml);
41+
} catch (Exception ex) {
42+
try {
43+
if (File.Exists (tempFile))
44+
File.Delete (tempFile);
5045
}
5146
catch { }
5247

53-
Assert.Fail("An unexpected exception was thrown : {0}", ex);
48+
Assert.Fail ("An unexpected exception was thrown : {0}", ex);
5449
}
5550
}
5651

0 commit comments

Comments
 (0)