Package no.kommune.bergen.soa.svarut.altinn.correspondence

Examples of no.kommune.bergen.soa.svarut.altinn.correspondence.CorrespondenceMessage


  @Test
  public void send() {
    Forsendelse forsendelse = newForsendelse();
    altinnFacade.send( forsendelse );
    CorrespondenceMessage message = myCorrespondenceClient.getLatestMessage();
    verifyMessageTitle( forsendelse, message );
    verifyMessageBody( forsendelse, message );
  }
View Full Code Here


    satisfyChecksInMockCorrespondenceClient( forsendelse );
    return forsendelse;
  }

  private void satisfyChecksInMockCorrespondenceClient( Forsendelse forsendelse ) {
    CorrespondenceMessage message = MockCorrespondenceClient.createMessage();
    forsendelse.setId( message.getExternalReference() );
    forsendelse.setMeldingsTekst( message.getMessageBody() );
    forsendelse.setTittel( message.getMessageTitle() );
  }
View Full Code Here

    settings.setSubjectTemplate( "$TITTEL" );
    return settings;
  }

  public static CorrespondenceMessage createMessage() {
    CorrespondenceMessage message = new CorrespondenceMessage();
    message.setOrgNr( "910558919" );
    message.setMessageSummary( "TestMessageSummary" );
    message.setMessageTitle( "Meldings tittel" );
    message.setMessageBody( "Meldingens tekst" );
    message.setExternalReference( "forsendelsesId" );
    return message;
  }
View Full Code Here

  @Test
  @Ignore
  public void sendLive() {
    CorrespondenceClient client = new CorrespondenceClient( settings );
    CorrespondenceMessage message = MockCorrespondenceClient.createMessage();
    int receiptId = client.send( message, null );
    Assert.assertFalse( 0 == receiptId );
  }
View Full Code Here

  }

  @Test
  public void send() {
    CorrespondenceClient client = new MockCorrespondenceClient( settings );
    CorrespondenceMessage message = MockCorrespondenceClient.createMessage();
    int receiptId = client.send(message, null);
    Assert.assertEquals( 1, receiptId );
  }
View Full Code Here

      log.debug("body template: " + this.correspondenceSettings.getBodyTemplate());
    }
    String subject = templateEngine.merge( model, this.correspondenceSettings.getSubjectTemplate() );
    String body = templateEngine.merge( model, this.correspondenceSettings.getBodyTemplate() );
    if(log.isDebugEnabled())log.debug("Subject: " + subject + " body: " + body);
    CorrespondenceMessage message = new CorrespondenceMessage();
    if (f.getOrgnr() != null)
      message.setOrgNr(f.getOrgnr());
    else
      message.setOrgNr(f.getFnr());
    message.setMessageTitle( subject );
    message.setMessageSummary( subject );
    message.setMessageBody( body );
    message.setExternalReference( f.getId() );
    return message;
  }
View Full Code Here

TOP

Related Classes of no.kommune.bergen.soa.svarut.altinn.correspondence.CorrespondenceMessage

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.