Package org.monjo.example

Examples of org.monjo.example.IntegerId


 
  @Test
  public void shouldCrud() throws Exception {
    Monjo<Integer, IntegerId> monjo = new Monjo<Integer, IntegerId>(getMongoDB(), IntegerId.class);
    monjo.removeAll();
    IntegerId integerId = new IntegerId();
    integerId.setId(1);
    integerId.setName("Teste");
    monjo.insert(integerId);
   
    IntegerId integerId2 = monjo.find().toList().get(0);
    assertEquals(integerId.getId(), integerId2.getId());
    assertEquals(integerId.getName(), integerId2.getName());
   
  }
View Full Code Here

TOP

Related Classes of org.monjo.example.IntegerId

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.