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

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


  }

  @Test
  public void should_persist_and_find_entity_having_compound_id_with_enum() throws Exception {
    long id = RandomUtils.nextLong(0,Long.MAX_VALUE);
    ClusteredMessageId messageId = new ClusteredMessageId(id, Type.TEXT);

    ClusteredMessageEntity message = new ClusteredMessageEntity(messageId, "a message");

    manager.insert(message);

    ClusteredMessageEntity found = manager.find(ClusteredMessageEntity.class, messageId);

    ClusteredMessageId foundCompoundKey = found.getId();
    assertThat(foundCompoundKey.getId()).isEqualTo(id);
    assertThat(foundCompoundKey.getType()).isEqualTo(Type.TEXT);
  }
View Full Code Here


  }

  @Test
  public void should_update_entity_having_compound_id_with_enum() throws Exception {
    long id = RandomUtils.nextLong(0,Long.MAX_VALUE);
    ClusteredMessageId messageId = new ClusteredMessageId(id, Type.IMAGE);

    ClusteredMessageEntity message = new ClusteredMessageEntity(messageId, "an image");

    message = manager.insert(message);
View Full Code Here

  }

  @Test
  public void should_delete_entity_having_compound_id_with_enum() throws Exception {
    long id = RandomUtils.nextLong(0,Long.MAX_VALUE);
    ClusteredMessageId messageId = new ClusteredMessageId(id, Type.AUDIO);

    ClusteredMessageEntity message = new ClusteredMessageEntity(messageId, "an mp3");

    message = manager.insert(message);
View Full Code Here

  public void should_refresh_entity_having_compound_id_with_enum() throws Exception {
    String label = "a random file";
    String newLabel = "a pdf file";

    long id = RandomUtils.nextLong(0,Long.MAX_VALUE);
    ClusteredMessageId messageId = new ClusteredMessageId(id, Type.FILE);

    ClusteredMessageEntity message = new ClusteredMessageEntity(messageId, label);

    message = manager.insert(message);
View Full Code Here

TOP

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

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.