Search in sources :

Example 1 with PutMessageRequestType

use of no.difi.meldingsutveksling.noarkexchange.schema.PutMessageRequestType in project efm-integrasjonspunkt by felleslosninger.

the class EphorteClientTest method testSendEduMelding.

@Test
public void testSendEduMelding() throws Exception {
    NoarkClientSettings settings = new NoarkClientSettings("http://localhost:7778/ephorte", "", "");
    EphorteClient client = new EphorteClient(settings);
    PutMessageResponseType result = client.sendEduMelding(new PutMessageRequestType());
    assertEquals("Hello world", result.getResult().getType());
}
Also used : PutMessageResponseType(no.difi.meldingsutveksling.noarkexchange.schema.PutMessageResponseType) PutMessageRequestType(no.difi.meldingsutveksling.noarkexchange.schema.PutMessageRequestType) Test(org.junit.jupiter.api.Test)

Example 2 with PutMessageRequestType

use of no.difi.meldingsutveksling.noarkexchange.schema.PutMessageRequestType in project efm-integrasjonspunkt by felleslosninger.

the class IntegrasjonspunktImplTest method shouldPutMessageOnQueueWhenPartyNumberIsInRequest.

@Test
public void shouldPutMessageOnQueueWhenPartyNumberIsInRequest() {
    PutMessageRequestType request = PutMessageObjectMother.createMessageRequestType("12345");
    integrasjonspunkt.putMessage(request);
    verify(nextMoveAdapterMock, times(1)).convertAndSend(any(PutMessageRequestWrapper.class));
}
Also used : PutMessageRequestType(no.difi.meldingsutveksling.noarkexchange.schema.PutMessageRequestType) Test(org.junit.jupiter.api.Test)

Example 3 with PutMessageRequestType

use of no.difi.meldingsutveksling.noarkexchange.schema.PutMessageRequestType in project efm-integrasjonspunkt by felleslosninger.

the class IntegrasjonspunktImplTest method shouldPutMessageOnQueueWhenOrganisationNumberIsConfigured.

@Test
public void shouldPutMessageOnQueueWhenOrganisationNumberIsConfigured() {
    when(organizationMock.getNumber()).thenReturn("1234");
    PutMessageRequestType request = PutMessageObjectMother.createMessageRequestType(null);
    integrasjonspunkt.putMessage(request);
    verify(nextMoveAdapterMock, times(1)).convertAndSend(any(PutMessageRequestWrapper.class));
}
Also used : PutMessageRequestType(no.difi.meldingsutveksling.noarkexchange.schema.PutMessageRequestType) Test(org.junit.jupiter.api.Test)

Example 4 with PutMessageRequestType

use of no.difi.meldingsutveksling.noarkexchange.schema.PutMessageRequestType in project efm-integrasjonspunkt by felleslosninger.

the class IntegrasjonspunktImplTest method shouldPutMessageOnQueueWhenOrganisationNumberIsProvided.

@Test
public void shouldPutMessageOnQueueWhenOrganisationNumberIsProvided() {
    PutMessageRequestType request = PutMessageObjectMother.createMessageRequestType("12345");
    integrasjonspunkt.putMessage(request);
    verify(nextMoveAdapterMock, times(1)).convertAndSend(any(PutMessageRequestWrapper.class));
}
Also used : PutMessageRequestType(no.difi.meldingsutveksling.noarkexchange.schema.PutMessageRequestType) Test(org.junit.jupiter.api.Test)

Example 5 with PutMessageRequestType

use of no.difi.meldingsutveksling.noarkexchange.schema.PutMessageRequestType in project efm-integrasjonspunkt by felleslosninger.

the class IpMailSenderTest method send.

private void send() throws JAXBException, IOException {
    PutMessageRequestType putMessage = createPutMessageCdataXml(FileUtils.readFileToString(new File("src/test/resources/putmessage_test.xml"), StandardCharsets.UTF_8));
    ipMailSender.send(putMessage, "foo");
}
Also used : PutMessageRequestType(no.difi.meldingsutveksling.noarkexchange.schema.PutMessageRequestType) File(java.io.File)

Aggregations

PutMessageRequestType (no.difi.meldingsutveksling.noarkexchange.schema.PutMessageRequestType)41 Test (org.junit.jupiter.api.Test)22 ModelMapper (org.modelmapper.ModelMapper)6 AddressType (no.difi.meldingsutveksling.noarkexchange.schema.AddressType)5 AppReceiptType (no.difi.meldingsutveksling.noarkexchange.schema.AppReceiptType)5 EnvelopeType (no.difi.meldingsutveksling.noarkexchange.schema.EnvelopeType)5 PutMessageResponseType (no.difi.meldingsutveksling.noarkexchange.schema.PutMessageResponseType)5 ObjectFactory (no.difi.meldingsutveksling.noarkexchange.schema.ObjectFactory)4 ByteArrayInputStream (java.io.ByteArrayInputStream)3 ByteArrayOutputStream (java.io.ByteArrayOutputStream)3 JAXBElement (javax.xml.bind.JAXBElement)3 StreamSource (javax.xml.transform.stream.StreamSource)3 PutMessageRequestMapper (no.difi.meldingsutveksling.noarkexchange.p360.PutMessageRequestMapper)3 PutMessageRequestMapper (no.difi.meldingsutveksling.noarkexchange.websak.PutMessageRequestMapper)3 WebServiceTemplate (org.springframework.ws.client.core.WebServiceTemplate)3 IOException (java.io.IOException)2 StringWriter (java.io.StringWriter)2 MeldingsUtvekslingRuntimeException (no.difi.meldingsutveksling.domain.MeldingsUtvekslingRuntimeException)2 SoapActionCallback (org.springframework.ws.soap.client.core.SoapActionCallback)2 StringSource (org.springframework.xml.transform.StringSource)2