diff options
author | pfullbright | 2011-10-19 20:24:29 +0000 |
---|---|---|
committer | pfullbright | 2011-10-19 20:24:29 +0000 |
commit | c0500c4abded713f7d619be246006359fbeb20d7 (patch) | |
tree | e325bf0650cef2cafc17ce0a3987b17cd7ddfa68 | |
parent | 618d9021da7116037cf6152e0da11bc48c433c50 (diff) | |
download | webtools.dali-c0500c4abded713f7d619be246006359fbeb20d7.tar.gz webtools.dali-c0500c4abded713f7d619be246006359fbeb20d7.tar.xz webtools.dali-c0500c4abded713f7d619be246006359fbeb20d7.zip |
added IndexedConversionDeclarationAnnotationElementAdapter usage to tests
-rw-r--r-- | common/tests/org.eclipse.jpt.common.core.tests/src/org/eclipse/jpt/common/core/tests/internal/utility/jdt/MemberAnnotationElementAdapterTests.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/common/tests/org.eclipse.jpt.common.core.tests/src/org/eclipse/jpt/common/core/tests/internal/utility/jdt/MemberAnnotationElementAdapterTests.java b/common/tests/org.eclipse.jpt.common.core.tests/src/org/eclipse/jpt/common/core/tests/internal/utility/jdt/MemberAnnotationElementAdapterTests.java index 1361ad1f89..3aaf924cf6 100644 --- a/common/tests/org.eclipse.jpt.common.core.tests/src/org/eclipse/jpt/common/core/tests/internal/utility/jdt/MemberAnnotationElementAdapterTests.java +++ b/common/tests/org.eclipse.jpt.common.core.tests/src/org/eclipse/jpt/common/core/tests/internal/utility/jdt/MemberAnnotationElementAdapterTests.java @@ -19,6 +19,7 @@ import org.eclipse.jpt.common.core.internal.utility.jdt.CharacterStringExpressio import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter; import org.eclipse.jpt.common.core.internal.utility.jdt.EnumArrayDeclarationAnnotationElementAdapter; import org.eclipse.jpt.common.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter; +import org.eclipse.jpt.common.core.internal.utility.jdt.IndexedConversionDeclarationAnnotationElementAdapter; import org.eclipse.jpt.common.core.internal.utility.jdt.NestedDeclarationAnnotationAdapter; import org.eclipse.jpt.common.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter; import org.eclipse.jpt.common.core.internal.utility.jdt.NumberIntegerExpressionConverter; @@ -31,7 +32,7 @@ import org.eclipse.jpt.common.core.utility.TextRange; import org.eclipse.jpt.common.core.utility.jdt.AnnotationElementAdapter; import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter; import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationElementAdapter; -import org.eclipse.jpt.common.core.utility.jdt.ExpressionConverter; +import org.eclipse.jpt.common.core.utility.jdt.IndexedExpressionConverter; @SuppressWarnings("nls") public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { @@ -991,7 +992,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { this.createAnnotationAndMembers("Foo", "String[] bar();"); ICompilationUnit cu = this.createTestType("@annot.Foo()"); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - DeclarationAnnotationElementAdapter<String[]> daea = new ConversionDeclarationAnnotationElementAdapter<String[]>(daa, "bar", AnnotationStringArrayExpressionConverter.forStrings()); + DeclarationAnnotationElementAdapter<String[]> daea = new IndexedConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", AnnotationStringArrayExpressionConverter.forStrings()); AnnotationElementAdapter<String[]> aea = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea); assertTrue(Arrays.equals(new String[0], aea.getValue())); } @@ -1002,7 +1003,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { ICompilationUnit cu = this.createTestType(); this.assertSourceDoesNotContain(expected, cu); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - DeclarationAnnotationElementAdapter<String[]> daea = new ConversionDeclarationAnnotationElementAdapter<String[]>(daa, "bar", AnnotationStringArrayExpressionConverter.forStrings()); + DeclarationAnnotationElementAdapter<String[]> daea = new IndexedConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", AnnotationStringArrayExpressionConverter.forStrings()); AnnotationElementAdapter<String[]> aea = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea); aea.setValue(new String[] {"string0", "string1"}); this.assertSourceContains(expected, cu); @@ -1014,7 +1015,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { ICompilationUnit cu = this.createTestType(); this.assertSourceDoesNotContain(expected, cu); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - DeclarationAnnotationElementAdapter<String[]> daea = new ConversionDeclarationAnnotationElementAdapter<String[]>(daa, "bar", AnnotationStringArrayExpressionConverter.forStrings()); + DeclarationAnnotationElementAdapter<String[]> daea = new IndexedConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", AnnotationStringArrayExpressionConverter.forStrings()); AnnotationElementAdapter<String[]> aea = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea); aea.setValue(new String[0]); this.assertSourceDoesNotContain(expected, cu); @@ -1026,8 +1027,8 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { ICompilationUnit cu = this.createTestType(); this.assertSourceDoesNotContain(expected, cu); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - ExpressionConverter<String[]> expressionConverter = new AnnotationStringArrayExpressionConverter(StringExpressionConverter.instance(), false); - DeclarationAnnotationElementAdapter<String[]> daea = new ConversionDeclarationAnnotationElementAdapter<String[]>(daa, "bar", expressionConverter); + IndexedExpressionConverter<String> expressionConverter = new AnnotationStringArrayExpressionConverter(StringExpressionConverter.instance(), false); + DeclarationAnnotationElementAdapter<String[]> daea = new IndexedConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", expressionConverter); AnnotationElementAdapter<String[]> aea = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea); aea.setValue(new String[0]); this.assertSourceContains(expected, cu); @@ -1039,7 +1040,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { ICompilationUnit cu = this.createTestType(); this.assertSourceDoesNotContain(annotation, cu); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - DeclarationAnnotationElementAdapter<String[]> daea = new ConversionDeclarationAnnotationElementAdapter<String[]>(daa, "bar", AnnotationStringArrayExpressionConverter.forStrings()); + DeclarationAnnotationElementAdapter<String[]> daea = new IndexedConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", AnnotationStringArrayExpressionConverter.forStrings()); AnnotationElementAdapter<String[]> aea = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea); aea.setValue(new String[] {"string0"}); this.assertSourceContains(annotation, cu); |