Package no.kommune.bergen.soa.svarut.dto

Examples of no.kommune.bergen.soa.svarut.dto.UserContext


  }

  @Test
  public void createJuridiskEnhetFrombehalfOfIdOk() {
    String onBehalfOfId = "12345678902";
    UserContext userContext = newUserContext( "12345678901", onBehalfOfId );
    JuridiskEnhet juridiskEnhet = JuridiskEnhetFactory.create( userContext );
    Assert.assertTrue( juridiskEnhet instanceof Fodselsnr );
    Assert.assertEquals( onBehalfOfId, juridiskEnhet.getValue() );
  }
View Full Code Here


  }

  @Test
  public void createJuridiskEnhetFrombehalfOfIdFail() {
    String onBehalfOfId = "12345";
    UserContext userContext = newUserContext( "12345678901", onBehalfOfId );
    Assert.assertTrue( JuridiskEnhetFactory.create( userContext ) instanceof IngenJuridiskEnhet );
  }
View Full Code Here

  }

  @Test
  public void createJuridiskEnhetUserIdFail() {
    String userId = "12345";
    UserContext userContext = newUserContext( userId, "" );
    Assert.assertTrue( JuridiskEnhetFactory.create( userContext ) instanceof IngenJuridiskEnhet );
  }
View Full Code Here

    UserContext userContext = newUserContext( userId, "" );
    Assert.assertTrue( JuridiskEnhetFactory.create( userContext ) instanceof IngenJuridiskEnhet );
  }

  private UserContext newUserContext( String userId, String onBehalfOfId ) {
    UserContext userContext = new UserContext();
    userContext.setUserid( userId );
    userContext.setOnBehalfOfId( onBehalfOfId );
    return userContext;
  }
View Full Code Here

TOP

Related Classes of no.kommune.bergen.soa.svarut.dto.UserContext

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.