Examples of MpRole


Examples of com.avaje.tests.model.map.MpRole

    MpUser u2 = eServer.find(MpUser.class, u.getId());
    Assert.assertNotNull(u2);

    u2.setName("Charlie Brown");
    MpRole ourl = new MpRole();
    ourl.setOrganizationId(47L);
    u2.getRoles().put("one", ourl);
    eServer.save(u2);

    MpUser u3 = eServer.find(MpUser.class, u.getId());
    Assert.assertEquals("Charlie Brown", u3.getName());

    Map<String, MpRole> listMap = u3.getRoles();
    Assert.assertEquals(1, listMap.size());
   
    MpRole mpRole = listMap.get("one");
    Assert.assertNotNull(mpRole);
    Assert.assertEquals(Long.valueOf(47L), mpRole.getOrganizationId());
    Assert.assertEquals("one", mpRole.getCode());
   
  }
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.