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

Source Code of no.kommune.bergen.soa.svarut.altinn.CorespondenceClientTest

package no.kommune.bergen.soa.svarut.altinn;

import junit.framework.Assert;

import no.kommune.bergen.soa.svarut.altinn.correspondence.CorrespondenceClient;
import no.kommune.bergen.soa.svarut.altinn.correspondence.CorrespondenceMessage;
import no.kommune.bergen.soa.svarut.altinn.correspondence.CorrespondenceSettings;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

public class CorespondenceClientTest {
  private CorrespondenceSettings settings;

  @Before
  public void setup() {
    settings = MockCorrespondenceClient.newSettings();
  }

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

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

}
TOP

Related Classes of no.kommune.bergen.soa.svarut.altinn.CorespondenceClientTest

TOP
Copyright © 2018 www.massapi.com. 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.