Package info.archinnov.achilles.test.integration.entity

Examples of info.archinnov.achilles.test.integration.entity.Tweet


        assertThatBatchContextHasBeenReset(batch);
    }

    @Test
    public void should_batch_with_custom_consistency_level() throws Exception {
        Tweet tweet1 = TweetTestBuilder.tweet().randomId().content("simple_tweet1").buid();
        Tweet tweet2 = TweetTestBuilder.tweet().randomId().content("simple_tweet2").buid();
        Tweet tweet3 = TweetTestBuilder.tweet().randomId().content("simple_tweet3").buid();

        manager.insert(tweet1);

        // Start batch
        Batch batch = manager.createBatch();
        batch.startBatch();

        batch.startBatch(QUORUM);

        Tweet foundTweet1 = manager.find(Tweet.class, tweet1.getId());

        assertThat(foundTweet1.getContent()).isEqualTo(tweet1.getContent());

        batch.insert(tweet2);
        batch.insert(tweet3);

        logAsserter.prepareLogLevel();
View Full Code Here


    }

    @Test
    public void should_reinit_batch_context_and_consistency_after_exception() throws Exception {
        boolean exceptionCaught = false;
        Tweet tweet1 = TweetTestBuilder.tweet().randomId().content("simple_tweet1").buid();
        Tweet tweet2 = TweetTestBuilder.tweet().randomId().content("simple_tweet2").buid();

        manager.insert(tweet1);

        // Start batch
        Batch batch = manager.createBatch();
View Full Code Here

  private PersistenceManager manager = resource.getPersistenceManager();

  @Test
  public void should_initialize_lazy_properties() throws Exception {
    Tweet tweet = new Tweet();
    tweet.setId(UUIDGen.getTimeUUID());
    tweet.setContent("welcome");

    CompleteBean entity = CompleteBeanTestBuilder.builder().randomId().name("name").label("label").age(45L)
        .addFriends("foo", "bar").welcomeTweet(tweet).version(CounterBuilder.incr(11L)).buid();

    manager.insert(entity);
View Full Code Here

TOP

Related Classes of info.archinnov.achilles.test.integration.entity.Tweet

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.