Examples of PlatformLocal


Examples of org.apache.openejb.test.entity.cmr.manytomany.PlatformLocal

        try {
            GameLocal game = findGame(new Integer(22));
            Set aSet = game.getPlatforms();
            assertEquals(3, aSet.size());
            for (Iterator iter = aSet.iterator(); iter.hasNext();) {
                PlatformLocal platform = (PlatformLocal) iter.next();
                if (platform.getId().equals(new Integer(1))) {
                    assertEquals("value1", platform.getName());
                } else if (platform.getId().equals(new Integer(2))) {
                    assertEquals("value2", platform.getName());
                } else if (platform.getId().equals(new Integer(3))) {
                    assertEquals("value3", platform.getName());
                } else {
                    fail();
                }
            }
        } finally {
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.manytomany.PlatformLocal

    public void testASetBDropExisting() throws Exception {
        resetDB();
        beginTransaction();
        try {
            PlatformLocal platform = findPlatform(new Integer(1));
            platform.setGames(new HashSet<GameLocal>());
            platform = findPlatform(new Integer(2));
            platform.setGames(new HashSet<GameLocal>());
            platform = findPlatform(new Integer(3));
            platform.setGames(new HashSet<GameLocal>());
        } finally {
            completeTransaction();
        }

        assertAllUnlinked();
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.manytomany.PlatformLocal

    public void testASetBNewAB() throws Exception {
        resetDB();
        beginTransaction();
        try {
            PlatformLocal platform = createPlatform(new Integer(4));
            GameLocal game = createGame(new Integer(33));
            Set<GameLocal> gameSets = platform.getGames();
            gameSets.add(game);
        } finally {
            completeTransaction();
        }
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.manytomany.PlatformLocal

    public void testBSetANewAB() throws Exception {
        resetDB();
        beginTransaction();
        try {
            PlatformLocal platform = createPlatform(new Integer(4));
            GameLocal game = createGame(new Integer(33));
            Set<PlatformLocal> platformSets = game.getPlatforms();
            platformSets.add(platform);
        } finally {
            completeTransaction();
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.manytomany.PlatformLocal

    public void testASetBExistingBNewA() throws Exception {
        resetDB();
        beginTransaction();
        try {
            PlatformLocal platform = createPlatform(new Integer(4));
            GameLocal game = findGame(new Integer(11));
            Set<GameLocal> gameSets = platform.getGames();
            gameSets.add(game);
        } finally {
            completeTransaction();
        }
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.manytomany.PlatformLocal

    public void testBSetAExistingBNewA() throws Exception {
        resetDB();
        beginTransaction();
        try {
            PlatformLocal platform = createPlatform(new Integer(4));
            GameLocal game = findGame(new Integer(11));
            Set<PlatformLocal> platformSets = game.getPlatforms();
            platformSets.add(platform);
        } finally {
            completeTransaction();
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.manytomany.PlatformLocal

    public void testASetBExistingANewB() throws Exception {
        resetDB();
        beginTransaction();
        try {
            PlatformLocal platform = findPlatform(new Integer(1));
            GameLocal game = createGame(new Integer(33));
            Set<GameLocal> gameSets = platform.getGames();
            gameSets.add(game);
        } finally {
            completeTransaction();
        }
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.manytomany.PlatformLocal

    public void testBSetAExistingANewB() throws Exception {
        resetDB();
        beginTransaction();
        try {
            PlatformLocal platform = findPlatform(new Integer(1));
            GameLocal game = createGame(new Integer(33));
            Set<PlatformLocal> platformSets = game.getPlatforms();
            platformSets.add(platform);
        } finally {
            completeTransaction();
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.manytomany.PlatformLocal

    public void testRemoveRelationships() throws Exception {
        resetDB();
        beginTransaction();
        try {
            PlatformLocal platform = findPlatform(new Integer(1));
            platform.remove();
        } finally {
            completeTransaction();
        }
        assertPlatformDeleted(1);
    }
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.manytomany.PlatformLocal

    public void testIllegalCmrCollectionArgument() throws Exception {
        resetDB();
        beginTransaction();
        try {
            PlatformLocal platform = findPlatform(new Integer(1));
            Set games = platform.getGames();

            try {
                games.add(new Object());
                fail("expected games.add(new Object()) to throw an IllegalArgumentException");
            } catch (IllegalArgumentException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.