Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2010-11-17 19:13:23 +0000
committerkmoore2010-11-17 19:13:23 +0000
commit99aa1028a4b7972edc03b2ed3337438d2179fec3 (patch)
treeeb57177e867539bab51743e9328a0ce54ab60deb /jpa/tests/org.eclipse.jpt.core.tests
parentdb287299090f592c77820c09e3fa01c283f3ad7b (diff)
downloadwebtools.dali-99aa1028a4b7972edc03b2ed3337438d2179fec3.tar.gz
webtools.dali-99aa1028a4b7972edc03b2ed3337438d2179fec3.tar.xz
webtools.dali-99aa1028a4b7972edc03b2ed3337438d2179fec3.zip
added tests for jaxb GenericRootContextNode packages
Diffstat (limited to 'jpa/tests/org.eclipse.jpt.core.tests')
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/AnnotationTestCase.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/AnnotationTestCase.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/AnnotationTestCase.java
index 4520c25877..e80584279f 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/AnnotationTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/AnnotationTestCase.java
@@ -137,6 +137,13 @@ public abstract class AnnotationTestCase extends TestCase {
return this.createTestPackageInfo(new DefaultAnnotationWriter());
}
+ /**
+ * create an un-annotated package-info in a package the given name
+ */
+ protected ICompilationUnit createTestPackageInfo(String packageName) throws CoreException {
+ return this.createTestPackageInfo(packageName, new DefaultAnnotationWriter());
+ }
+
/**
* shortcut for simply adding an annotation to the package declaration
*/
@@ -159,8 +166,12 @@ public abstract class AnnotationTestCase extends TestCase {
}
protected ICompilationUnit createTestPackageInfo(AnnotationWriter annotationWriter) throws CoreException {
+ return this.createTestPackageInfo(PACKAGE_NAME, annotationWriter);
+ }
+
+ protected ICompilationUnit createTestPackageInfo(String packageName, AnnotationWriter annotationWriter) throws CoreException {
return this.javaProject.createCompilationUnit(
- PACKAGE_NAME, PACKAGE_INFO_FILE_NAME, this.createSourceWriter(annotationWriter, null));
+ packageName, PACKAGE_INFO_FILE_NAME, this.createSourceWriter(annotationWriter, packageName, null));
}
@@ -214,6 +225,10 @@ public abstract class AnnotationTestCase extends TestCase {
return new AnnotatedSourceWriter(annotationWriter, typeName);
}
+ protected SourceWriter createSourceWriter(AnnotationWriter annotationWriter, String packageName, String typeName) {
+ return new AnnotatedSourceWriter(annotationWriter, packageName, typeName);
+ }
+
/**
* writes source for package-info java files
*/

Back to the top