Skip to content

Commit 675ed94

Browse files
committed
Bytecode Tests - added doclet type assertion
Takes a path and expected doclet type and asserts they match.
1 parent 97031e6 commit 675ed94

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,22 @@ protected static void AssertXmlDeclaration (string[] classResources, string xmlR
7878

7979
Assert.AreEqual (expected, actual.ToString ());
8080
}
81+
82+
protected static void AssertDocletType (string path, JavaDocletType docletType)
83+
{
84+
var classPathBuilder = new ClassPath () {
85+
ApiSource = "class-parse",
86+
DocumentationPaths = new string[] {
87+
path,
88+
},
89+
AutoRename = true
90+
};
91+
92+
var actual = new StringWriter ();
93+
classPathBuilder.SaveXmlDescription (actual);
94+
95+
Assert.AreEqual (docletType, classPathBuilder.DocletType);
96+
}
8197
}
8298
}
8399

0 commit comments

Comments
 (0)