diff options
Diffstat (limited to 'jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/resource/java/EclipseLinkPrimaryKeyAnnotationTests.java')
-rw-r--r-- | jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/resource/java/EclipseLinkPrimaryKeyAnnotationTests.java | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/resource/java/EclipseLinkPrimaryKeyAnnotationTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/resource/java/EclipseLinkPrimaryKeyAnnotationTests.java deleted file mode 100644 index f7781fb560..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/resource/java/EclipseLinkPrimaryKeyAnnotationTests.java +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License v1.0 which - * accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.tests.internal.resource.java; - -import java.util.Iterator; -import org.eclipse.jdt.core.ICompilationUnit; -import org.eclipse.jpt.common.core.resource.java.JavaResourceType; -import org.eclipse.jpt.common.utility.internal.iterators.ArrayIterator; -import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLink; - -@SuppressWarnings("nls") -public class EclipseLinkPrimaryKeyAnnotationTests - extends EclipseLinkJavaResourceModelTestCase -{ - public EclipseLinkPrimaryKeyAnnotationTests(String name) { - super(name); - } - - - private ICompilationUnit createTestTypeWithPrimaryKeyAnnotation() throws Exception { - return this.createTestType(new DefaultAnnotationWriter() { - @Override - public Iterator<String> imports() { - return new ArrayIterator<String>(EclipseLink.PRIMARY_KEY); - } - @Override - public void appendTypeAnnotationTo(StringBuilder sb) { - sb.append("@PrimaryKey"); - } - }); - } - - - public void testAddRemoveAnnotation() throws Exception { - ICompilationUnit cu = this.createTestTypeWithPrimaryKeyAnnotation(); - JavaResourceType resourceType = buildJavaResourceType(cu); - - assertNotNull(resourceType.getAnnotation(EclipseLink.PRIMARY_KEY)); - - resourceType.removeAnnotation(EclipseLink.PRIMARY_KEY); - assertNull(resourceType.getAnnotation(EclipseLink.PRIMARY_KEY)); - - resourceType.addAnnotation(EclipseLink.PRIMARY_KEY); - assertNotNull(resourceType.getAnnotation(EclipseLink.PRIMARY_KEY)); - } -} |