Package fr.norsys.mapper.console.model

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


 
  public void test01get(){
    if(log.isDebugEnabled()) log.debug("*** test01get ***");
    List ids=new ArrayList();

    IdentifiantComponent ic1 = new IdentifiantComponent("test1","value1",true);
    IdentifiantComponent ic2 = new IdentifiantComponent("test2","value2",false);
   
    ids.add(ic1);
    ids.add(ic2);

    IdentifiantComponent idComp1 = identifiantService.get(ic1.getId(),ids);
    IdentifiantComponent idComp2 = identifiantService.get(ic2.getId(),ids);

    assertEquals("name must be test1","test1",idComp1.getName());
    assertEquals("value must be value1","value1",idComp1.getValue());
    assertTrue("is identifiant a variable must be true",idComp1.isIdVariable());
    assertEquals("name must be test2","test2",idComp2.getName());
    assertEquals("value must be value2","value2",idComp2.getValue());
    assertFalse("is identifiant a variable must be false",idComp2.isIdVariable());
 
View Full Code Here


 
  public void test01add(){
    if(log.isDebugEnabled()) log.debug("*** test01add ***");
    List ics=new ArrayList();

    IdentifiantComponent ic2 = new IdentifiantComponent();
    ic2.setName("test2");
    ic2.setValue("value2");
    ic2.setIdVariable(false);
    try {
      identifiantService.save(ic2, ics);
    } catch (IdentifiantException e) {
      log.error(e);
    }
View Full Code Here

 
  public void test01modify(){
    if(log.isDebugEnabled()) log.debug("*** test01modify ***");
    List ics=new ArrayList();

    IdentifiantComponent ic1 = new IdentifiantComponent("test1","value1",true);
    IdentifiantComponent ic2 = new IdentifiantComponent("test2","value2",false);
   
    ics.add(ic1);
    ics.add(ic2);

    ic2.setValue("value3");
    try {
      identifiantService.save(ic2, ics);
    } catch (IdentifiantException e) {
      log.error(e);
    }
   
    IdentifiantComponent idComp2 = identifiantService.get(ic2.getId(),ics);

    assertEquals("name must be test2","test2",idComp2.getName());
    assertEquals("value must be value3","value3",idComp2.getValue());
    assertFalse("is identifiant a variable must be false",idComp2.isIdVariable());
   
  }
View Full Code Here

 
  public void test01delete(){
    if(log.isDebugEnabled()) log.debug("*** test01delete ***");
    List ics=new ArrayList();

    IdentifiantComponent ic1 = new IdentifiantComponent("test1","value1",true);
   
    ics.add(ic1);

    identifiantService.delete(ic1.getId(), ics);
   
    assertTrue("the list must be empty",ics.size()==0);
   
  }
View Full Code Here

TOP

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

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.