Package com.streamreduce.core.model

Examples of com.streamreduce.core.model.OutboundConfiguration


*/
public class WebHDFSOutboundClientTest {

    @Test(expected = IllegalArgumentException.class)
    public void testPutRawMessage_emptyPayload() throws Exception {
        OutboundConfiguration outboundConfiguration = mock(OutboundConfiguration.class);
        when(outboundConfiguration.getDestination()).thenReturn("");
        new WebHDFSOutboundClient(outboundConfiguration).putRawMessage(new JSONObject());
    }
View Full Code Here


        Account acct = new Account.Builder().name("testacct").build();
        acct.setId(accountId);
        Connection mockConnection = mock(Connection.class);
        when(mockConnection.getAccount()).thenReturn(acct);

        OutboundConfiguration mockOutboundConfiguration = mock(OutboundConfiguration.class);
        when(mockOutboundConfiguration.getNamespace()).thenReturn(null);
        when(mockOutboundConfiguration.getOriginatingConnection()).thenReturn(mockConnection);

        String bucketName = awsClientUnderTest.convertOutboundConnectionToBucketName(mockOutboundConfiguration);
        String expected = "com.streamreduce." + accountId.toString();
        assertEquals(expected,bucketName);
    }
View Full Code Here

        new WebHDFSOutboundClient(outboundConfiguration).putRawMessage(new JSONObject());
    }

    @Test(expected = IllegalArgumentException.class)
    public void testPutRawMessage_nullPayload() throws Exception {
        OutboundConfiguration outboundConfiguration = mock(OutboundConfiguration.class);
        when(outboundConfiguration.getDestination()).thenReturn("");
        new WebHDFSOutboundClient(outboundConfiguration).putRawMessage(null);
    }
View Full Code Here

        new WebHDFSOutboundClient(outboundConfiguration).putRawMessage(null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testPutProcessedMessage_nullSobaMessage() throws Exception {
        OutboundConfiguration outboundConfiguration = mock(OutboundConfiguration.class);
        when(outboundConfiguration.getDestination()).thenReturn("");
        new WebHDFSOutboundClient(outboundConfiguration).putProcessedMessage((SobaMessage)null);
    }
View Full Code Here

        new WebHDFSOutboundClient(outboundConfiguration).putProcessedMessage((SobaMessage)null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testPutProcessedMessage_nullSobaMessageResponseDTO() throws Exception {
        OutboundConfiguration outboundConfiguration = mock(OutboundConfiguration.class);
        when(outboundConfiguration.getDestination()).thenReturn("");
        new WebHDFSOutboundClient(outboundConfiguration).putProcessedMessage((SobaMessageResponseDTO)null);
    }
View Full Code Here

        new WebHDFSOutboundClient(outboundConfiguration).putProcessedMessage((SobaMessageResponseDTO)null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testPutInsightMessage_nullSobaMessage() throws Exception {
        OutboundConfiguration outboundConfiguration = mock(OutboundConfiguration.class);
        when(outboundConfiguration.getDestination()).thenReturn("");
        new WebHDFSOutboundClient(outboundConfiguration).putInsightMessage((SobaMessage) null);
    }
View Full Code Here

        new WebHDFSOutboundClient(outboundConfiguration).putInsightMessage((SobaMessage) null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testPutInsightMessage_nullSobaMessageResponseDTO() throws Exception {
        OutboundConfiguration outboundConfiguration = mock(OutboundConfiguration.class);
        when(outboundConfiguration.getDestination()).thenReturn("");
        new WebHDFSOutboundClient(outboundConfiguration).putInsightMessage((SobaMessageResponseDTO) null);
    }
View Full Code Here

public class OutboundConfigurationServiceDTOTest {

    @Test
    public void testSerializeAndDeserialize_EqualsAndHashCode() throws Exception {
        OutboundConfiguration outboundConfiguration = new OutboundConfiguration.Builder()
                .protocol("s3")
                .destination("us-east")
                .namespace("my.foo.bucket")
                .credentials(new ConnectionCredentials("foo", "bar"))
                .dataTypes(OutboundDataType.PROCESSED).build();
View Full Code Here

        try {

            String dtoAsString = exchange.getIn().getBody(String.class);
            OutboundConfigurationWithPayloadDTO dto = objectMapper.readValue(dtoAsString,
                    OutboundConfigurationWithPayloadDTO.class);
            OutboundConfiguration outboundConfiguration =
                    createOutboundConfigurationFromDto(dto.getOutboundConfiguration());
            OutboundClient outboundClient =
                    outboundClientFactory.createOutboundClientForOutboundConfiguration(outboundConfiguration);

            if (dto.getDataType() == OutboundDataType.RAW) {
View Full Code Here

    @Test
    public void testSendProcessedMessageAppearsInS3WithDifferentRegion() throws Exception {
        JSONObject imgPayload = TestUtils.createValidSampleIMGPayload();
        Connection testIMGConnection = TestUtils.createIMGConnectionWithSpecificOutboundDatatypes();

        OutboundConfiguration outboundConfiguration = new OutboundConfiguration.Builder()
                .credentials(TestUtils.createCloudConnection().getCredentials())
                .dataTypes(OutboundDataType.PROCESSED)
                .protocol("s3")
                .destination("eu-west-1")
                .build();
View Full Code Here

TOP

Related Classes of com.streamreduce.core.model.OutboundConfiguration

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.