Package fr.norsys.mapper.console.model

Examples of fr.norsys.mapper.console.model.Resource


  public void test01Add() throws Exception {
    if(log.isDebugEnabled()) log.debug("*** test01Add ***");
    List applications = new ArrayList();
    Application application = new Application("test");
    applications.add(application);
    Resource r = new Resource();
    r.setName("resource");
    Application a = applicationService.get(application.getId(), applications);
    resourceService.save(r,a);
   
    assertTrue("size must be superior to 0",application.getResources().size() > 0);
    assertTrue("size must be superior to 0",applicationService.get(a.getId(),applications).getResources().size() > 0);
View Full Code Here


  public void test01Modify() throws Exception {
    if(log.isDebugEnabled()) log.debug("*** test01Modify ***");
    List applications = new ArrayList();
    Collection resources =new  TreeSet(new ResourceNameComparator());
    Collection resources2 =new  TreeSet(new ResourceNameComparator());
    Resource resource = new Resource("test");
    String currentResource = resource.getId();
    resources.add(resource);
   
    Resource resource2 = new Resource("test2");
    String currentResource2 = resource2.getId();
    Collection attributes =new  TreeSet(new AttributeNameComparator());
    Attribute attribute = new Attribute("test");
    attributes.add(attribute);
    resource2.setAttributes(attributes);
    resources.add(resource2);
    Application application = new Application("test");
    application.setResources(resources);
   
    Resource resource3 = new Resource("test3");
    String currentResource3 = resource.getId();
    resources2.add(resource3);
    Resource resource4 = new Resource("test4");
    String currentResource4 = resource2.getId();
    resources2.add(resource4);
    Application application2 = new Application("test2");
    application2.setResources(resources2);
    applications.add(application);
View Full Code Here

TOP

Related Classes of fr.norsys.mapper.console.model.Resource

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.