public class BasicNamingStrategyTest extends TestCase {
public void testStrategy() throws Exception {
BasicNamingStrategy strategy = new BasicNamingStrategy();
ExportedKey key = new ExportedKey("ARTIST", "ARTIST_ID", null,
"PAINTING", "ARTIST_ID", null);
assertEquals(strategy.createDbRelationshipName(key, false), "toArtist");
assertEquals(strategy.createDbRelationshipName(key, true), "paintingArray");
key = new ExportedKey("PERSON", "PERSON_ID", null,
"PERSON", "MOTHER_ID", null);
assertEquals(strategy.createDbRelationshipName(key, false), "toPerson");
assertEquals(strategy.createDbRelationshipName(key, true), "personArray");
assertEquals(strategy.createObjEntityName(new DbEntity("ARTIST")), "Artist");