/******************************************************************************* | |
* Copyright (c) 1998, 2008 Oracle. All rights reserved. | |
* This program and the accompanying materials are made available under the | |
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 | |
* which accompanies this distribution. | |
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html | |
* and the Eclipse Distribution License is available at | |
* http://www.eclipse.org/org/documents/edl-v10.php. | |
* | |
* Contributors: | |
* dclarke - Dynamic Persistence INCUBATION - Enhancement 200045 | |
* http://wiki.eclipse.org/EclipseLink/Development/JPA/Dynamic | |
* | |
* This code is being developed under INCUBATION and is not currently included | |
* in the automated EclipseLink build. The API in this code may change, or | |
* may never be included in the product. Please provide feedback through mailing | |
* lists or the bug database. | |
******************************************************************************/ | |
package org.eclipse.persistence.testing.tests.dynamic.orm.comics; | |
import static junit.framework.Assert.assertNotNull; | |
import static junit.framework.Assert.assertTrue; | |
import org.eclipse.persistence.descriptors.ClassDescriptor; | |
import org.eclipse.persistence.dynamic.DynamicEntity; | |
import org.eclipse.persistence.sessions.server.Server; | |
import org.junit.Test; | |
public class ConfigTests { | |
@Test | |
public void verifyDescriptorClasses() { | |
Server server = SessionHelper.getComicsSession(); | |
assertNotNull(server); | |
ClassDescriptor descriptor = server.getClassDescriptorForAlias("Issue"); | |
assertNotNull(descriptor); | |
assertTrue(DynamicEntity.class.isAssignableFrom(descriptor.getJavaClass())); | |
descriptor = server.getClassDescriptorForAlias("Publisher"); | |
assertNotNull(descriptor); | |
assertTrue(DynamicEntity.class.isAssignableFrom(descriptor.getJavaClass())); | |
descriptor = server.getClassDescriptorForAlias("Title"); | |
assertNotNull(descriptor); | |
assertTrue(DynamicEntity.class.isAssignableFrom(descriptor.getJavaClass())); | |
} | |
} |