public void DocletType_ShouldDetectApiXml() { string tempFile = null; try { tempFile = LoadToTempFile("ParameterFixupApiXmlDocs.xml"); Assert.AreEqual(JavaDocletType._ApiXml, JavaMethodParameterNameProvider.GetDocletType(tempFile)); } finally { if (File.Exists(tempFile)) { File.Delete(tempFile); } } }
public void DocletType_ShouldDetectDroidDocs() { var androidSdkPath = Environment.GetEnvironmentVariable("ANDROID_SDK_PATH"); if (string.IsNullOrEmpty(androidSdkPath)) { Assert.Ignore("The `ANDROID_SDK_PATH` environment variable isn't set; " + "cannot test importing parameter names from HTML. Skipping..."); return; } var droidDocsPath = Path.Combine(androidSdkPath, "docs", "reference"); if (!Directory.Exists(droidDocsPath)) { Assert.Fail("The Android SDK Documentation path `{0}` was not found.", droidDocsPath); } Assert.AreEqual(JavaDocletType.DroidDoc2, JavaMethodParameterNameProvider.GetDocletType(droidDocsPath)); }