Package no.kommune.bergen.soa.svarut.domain

Examples of no.kommune.bergen.soa.svarut.domain.Fodselsnr


public class FodselsnrTest {

  @Test
  public void createOrgOk() {
    String fnr = "12345678901";
    Assert.assertEquals( fnr, new Fodselsnr( fnr ).toString() );
  }
View Full Code Here


  }

  @Test(expected = java.lang.IllegalArgumentException.class)
  public void createOrgFail() {
    String fnr = "123456789012";
    Assert.assertEquals( fnr, new Fodselsnr( fnr ).toString() );
  }
View Full Code Here

    saveThenRetrieveSeveral( new Orgnr( orgnr ) );
  }

  @Test
  public void saveThenRetrieveSeveralFnr() {
    saveThenRetrieveSeveral( new Fodselsnr( fnr ) );
  }
View Full Code Here

  @Test
  public void authorizeFodselsnrOk() {
    Forsendelse f = createForsendelse( 1 );
    String id = forsendelsesArkiv.save( f, getTestDocument() );
    try {
      forsendelsesArkiv.authorize( id, new Fodselsnr( f.getFnr() ) );
    } catch (AccessControlException e) {
      fail( e.getMessage() );
    }
  }
View Full Code Here

  @Test(expected = AccessControlException.class)
  public void authorizeFodselsnrFail() {
    Forsendelse f = createForsendelse( 1 );
    String id = forsendelsesArkiv.save( f, getTestDocument() );
    forsendelsesArkiv.authorize( id, new Fodselsnr( "00000000000" ) );
  }
View Full Code Here

    }
  }

  @Override
  public List<no.kommune.bergen.soa.svarut.dto.ForsendelseStatus> retrieveForPerson( UserContext userContext, String fnr ) {
    return retrieveForJuridiskEnhet( new Fodselsnr( fnr ) );
  }
View Full Code Here

public class JuridiskEnhetFactory {
  private JuridiskEnhetFactory() {}

  public static JuridiskEnhet create( String value ) {
    if (value == null) return new IngenJuridiskEnhet();
    if (value.length() == 11) return new Fodselsnr( value );
    if (value.length() == 9) return new Orgnr( value );
    return new IngenJuridiskEnhet();
  }
View Full Code Here

TOP

Related Classes of no.kommune.bergen.soa.svarut.domain.Fodselsnr

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.