Package org.apache.openejb.test.entity.cmr.manytomany

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


    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

    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

    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

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

        assertPlatformDeleted(1);
View Full Code Here

       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

        resetDB();
        beginTransaction();
        Set games;
        GameLocal newGame;
        try {
            PlatformLocal platform = findPlatform(new Integer(1));
            newGame = createGame(new Integer(33));
            games = platform.getGames();
        } finally {
            completeTransaction();
        }

        // CMR collections should still be readable
View Full Code Here

        resetDB();
        beginTransaction();
        Set games;
        GameLocal newGame;
        try {
            PlatformLocal platform = findPlatform(new Integer(1));
            newGame = createGame(new Integer(33));
            games = platform.getGames();
        } finally {
            completeTransaction();
        }

        beginTransaction();
View Full Code Here

    public void testIteratorConcurrentModification() throws Exception {
        resetDB();
        beginTransaction();
        Set games;
        try {
            PlatformLocal platform = findPlatform(new Integer(1));
            GameLocal game = findGame(new Integer(11));
            games = platform.getGames();
            assertFalse(games.isEmpty());
            assertEquals(2, games.size());

            Iterator iterator = games.iterator();
View Full Code Here

    public void testIteratorAndRemove() throws Exception {
        resetDB();
        beginTransaction();
        Set games;
        try {
            PlatformLocal platform = findPlatform(new Integer(1));
            GameLocal game = findGame(new Integer(11));
            games = platform.getGames();
            assertFalse(games.isEmpty());
            assertEquals(2, games.size());

            Iterator iterator = games.iterator();

            assertTrue(games.contains(game));
            platform.remove();
            assertFalse(games.contains(game));
            assertEquals(0, games.size());

            try {
                iterator.next();
View Full Code Here

TOP

Related Classes of org.apache.openejb.test.entity.cmr.manytomany.PlatformLocal

Copyright © 2018 www.massapicom. 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.