Examples of assertWithTimeout()


Examples of org.apache.cayenne.unit.util.ThreadedTestHelper.assertWithTimeout()

            @Override
            protected void assertResult() throws Exception {
                assertTrue("Delegate was not consulted", methodInvoked[0]);
            }
        };
        helper.assertWithTimeout(3000);
    }

    /**
     * Test case to prove that delegate method can block changes made by ObjectStore.
     *
 
View Full Code Here

Examples of org.apache.cayenne.unit.util.ThreadedTestHelper.assertWithTimeout()

            @Override
            protected void assertResult() throws Exception {
                assertTrue("Delegate was not consulted", methodInvoked[0]);
            }
        };
        helper.assertWithTimeout(3000);
    }

    /**
     * Test case to prove that delegate method is invoked on external change of object in
     * the store, and is able to block further object processing.
View Full Code Here

Examples of org.apache.cayenne.unit.util.ThreadedTestHelper.assertWithTimeout()

            @Override
            protected void assertResult() throws Exception {
                assertTrue("Delegate was not consulted", methodInvoked[0]);
            }
        };
        helper.assertWithTimeout(3000);
        assertEquals(PersistenceState.COMMITTED, altArtist.getPersistenceState());
        assertNotNull(altArtist.getObjectContext());
    }
}
View Full Code Here

Examples of org.apache.cayenne.unit.util.ThreadedTestHelper.assertWithTimeout()

                        "Snapshot change is not propagated: " + freshSnapshot,
                        NEW_NAME,
                        a2.getArtistName());
            }
        };
        helper.assertWithTimeout(3000);
    }
}
View Full Code Here

Examples of org.apache.cayenne.unit.util.ThreadedTestHelper.assertWithTimeout()

                        "Peer object state wasn't refreshed on fetch",
                        newName,
                        artist.getArtistName());
            }
        };
        helper.assertWithTimeout(3000);
    }

    /**
     * Test case to prove that changes made to an object in one ObjectStore and committed
     * to the database will be reflected in the peer ObjectStore using the same
View Full Code Here

Examples of org.apache.cayenne.unit.util.ThreadedTestHelper.assertWithTimeout()

            @Override
            protected void assertResult() throws Exception {
                assertEquals(newName, altArtist.getArtistName());
            }
        };
        helper.assertWithTimeout(3000);
    }

    /**
     * Test case to prove that changes made to an object in one ObjectStore and committed
     * to the database will be correctly merged in the peer ObjectStore using the same
View Full Code Here

Examples of org.apache.cayenne.unit.util.ThreadedTestHelper.assertWithTimeout()

                assertEquals(newAltName, altArtist.getArtistName());
                assertEquals(newDate, altArtist.getDateOfBirth());
                assertEquals(PersistenceState.MODIFIED, altArtist.getPersistenceState());
            }
        };
        helper.assertWithTimeout(3000);

    }

    /**
     * Test case to prove that deleting an object in one ObjectStore and committing to the
View Full Code Here

Examples of org.apache.cayenne.unit.util.ThreadedTestHelper.assertWithTimeout()

            protected void assertResult() throws Exception {
                assertEquals(PersistenceState.TRANSIENT, altArtist.getPersistenceState());
                assertNull(altArtist.getObjectContext());
            }
        };
        helper.assertWithTimeout(3000);
    }

    /**
     * Test case to prove that deleting an object in one ObjectStore and committed to the
     * database will be reflected in the peer ObjectStore using the same DataRowCache. By
View Full Code Here

Examples of org.apache.cayenne.unit.util.ThreadedTestHelper.assertWithTimeout()

            protected void assertResult() throws Exception {
                assertEquals(PersistenceState.TRANSIENT, altArtist.getPersistenceState());
                assertNull(altArtist.getObjectContext());
            }
        };
        helper.assertWithTimeout(3000);
    }

    /**
     * Test case to prove that deleting an object in one ObjectStore and committed to the
     * database will be reflected in the peer ObjectStore using the same DataRowCache. By
View Full Code Here

Examples of org.apache.cayenne.unit.util.ThreadedTestHelper.assertWithTimeout()

            @Override
            protected void assertResult() throws Exception {
                assertEquals(PersistenceState.NEW, altArtist.getPersistenceState());
            }
        };
        helper.assertWithTimeout(3000);

        // check if now we can save this object again, and with the original
        // ObjectId
        ObjectId id = altArtist.getObjectId();
        assertNotNull(id);
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.