Package org.javaee7.extra.nosql.couchbase

Examples of org.javaee7.extra.nosql.couchbase.PersonSessionBean


   
    assertEquals(eBook.getNumPages(),response.getNumPages());
  }
  @Test
  public void test3FindEbooks(){
    EBookStore eBookStore = eBookStoreService.getPort(EBookStore.class);
    List<String> titleList=eBookStore.findEBooks("Rings");
   
    assertNotNull(titleList);
    assertEquals(1, titleList.size());
    assertEquals("The Lord of the Rings",titleList.get(0));
  }
View Full Code Here


    assertEquals(1, titleList.size());
    assertEquals("The Lord of the Rings",titleList.get(0));
  }
  @Test
  public void test4AddAppendix(){
    EBookStore eBookStore = eBookStoreService.getPort(EBookStore.class);
    EBook eBook=eBookStore.takeBook("Oliver Twist");
   
    assertEquals(268,eBook.getNumPages());
    EBook eBookResponse=eBookStore.addAppendix(eBook, 5);
   
    assertEquals(268,eBook.getNumPages());
    assertEquals(273,eBookResponse.getNumPages());
  }
View Full Code Here

    @PersistenceContext
    private EntityManager entityManager;

    public void saveNewEntity() {
       
        TestEntity testEntity = new TestEntity();
        testEntity.setValue("mytest");
       
        entityManager.persist(testEntity);
    }
View Full Code Here

    @PersistenceContext
    private EntityManager entityManager;

    public void saveNewEntity() {
       
        TestEntity testEntity = new TestEntity();
        testEntity.setValue("mytest");
       
        entityManager.persist(testEntity);
    }
View Full Code Here

    @PersistenceContext
    private EntityManager entityManager;

    public void saveNewEntity() {
       
        TestEntity testEntity = new TestEntity();
        testEntity.setValue("mytest");
       
        entityManager.persist(testEntity);
    }
View Full Code Here

    public void testGet() throws Exception {
        assertNotNull(bean);
        List<Employee> list = bean.get();
        assertNotNull(list);
        assertEquals(8, list.size());
        assertFalse(list.contains(new Employee("Penny")));
        assertFalse(list.contains(new Employee("Sheldon")));
        assertFalse(list.contains(new Employee("Amy")));
        assertFalse(list.contains(new Employee("Leonard")));
        assertFalse(list.contains(new Employee("Bernadette")));
        assertFalse(list.contains(new Employee("Raj")));
        assertFalse(list.contains(new Employee("Howard")));
        assertFalse(list.contains(new Employee("Priya")));
    }
View Full Code Here

        // Nothing inserted yet, data base should not contain any entities
        // (this tests that a simple query without parameters works as named query created by Criteria)
        assertTrue(testService.getAll().size() == 0);

        // Insert one entity
        TestEntity testEntity = new TestEntity();
        testEntity.setValue("myValue");
        testService.save(testEntity);

        // The total amount of entities should be 1
        assertTrue(testService.getAll().size() == 1);
View Full Code Here

    @Test
    public void saveInOneGo() {
        Parent parent = new Parent();

        Child child1 = new Child();
        child1.setParent(parent);

        Child child2 = new Child();
        child2.setParent(parent);

        parent.getChildren().add(child1);
        parent.getChildren().add(child2);

        parent = indexColumnTesterService.save(parent);
View Full Code Here

    @Test
    public void saveParentSeparatelyFirst() {

        Parent parent = indexColumnTesterService.save(new Parent());

        Child child1 = new Child();
        child1.setParent(parent);

        Child child2 = new Child();
        child2.setParent(parent);

        parent.getChildren().add(child1);
        parent.getChildren().add(child2);

        parent = indexColumnTesterService.save(parent);
View Full Code Here

    @Test
    public void saveParentWithOneChildFirst() {

        Parent parent = new Parent();
        Child child1 = new Child();
        child1.setParent(parent);
        parent.getChildren().add(child1);

        // Save parent with 1 child in one go
        parent = indexColumnTesterService.save(parent);

        Child child2 = new Child();
        child2.setParent(parent);
        parent.getChildren().add(child2);

        // Save parent again with second child
        parent = indexColumnTesterService.save(parent);
View Full Code Here

TOP

Related Classes of org.javaee7.extra.nosql.couchbase.PersonSessionBean

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.