Package org.apache.camel.avro.generated

Examples of org.apache.camel.avro.generated.Key



    @Test
    public void testInOnly() throws Exception {
        initializeTranceiver();
        Key key = Key.newBuilder().setKey("1").build();
        Value value = Value.newBuilder().setValue("test value").build();
        Object[] request = {key, value};
        requestor.request("put", request);
    }
View Full Code Here


    @Test
    public void testInOut() throws Exception {
        initializeTranceiver();
        keyValue.getStore().clear();
        Key key = Key.newBuilder().setKey("2").build();
        Value value = Value.newBuilder().setValue("test value").build();
        keyValue.getStore().put(key, value);
        Object[] request = {key};
        Object response = requestor.request("get", request);
        Assert.assertEquals(value, response);
View Full Code Here

        }
    }

    @Test
    public void testInOnly() throws InterruptedException {
        Key key = Key.newBuilder().setKey("1").build();
        Value value = Value.newBuilder().setValue("test value").build();
        Object[] request = {key, value};
        template.sendBodyAndHeader("direct:in", request, AvroConstants.AVRO_MESSAGE_NAME, "put");
        Assert.assertEquals(value, keyValue.getStore().get(key));
    }
View Full Code Here


    @Test
    public void testInOut() throws InterruptedException {
        keyValue.getStore().clear();
        Key key = Key.newBuilder().setKey("2").build();
        Value value = Value.newBuilder().setValue("test value").build();
        keyValue.getStore().put(key, value);

        MockEndpoint mock = getMockEndpoint("mock:result-inout");
        mock.expectedMessageCount(1);
View Full Code Here

    }

    @Test
    public void testInOnly() throws Exception {
        initializeTranceiver();
        Key key = Key.newBuilder().setKey("1").build();
        Value value = Value.newBuilder().setValue("test value").build();
        Object[] request = {key, value};
        requestor.request("put", request);
    }
View Full Code Here

    }

    @Test
    public void testInOnlyMessageInRoute() throws Exception {
        initializeTranceiver();
        Key key = Key.newBuilder().setKey("1").build();
        Value value = Value.newBuilder().setValue("test value").build();
        Object[] request = {key, value};
        requestorMessageInRoute.request("put", request);
    }
View Full Code Here

    }

    @Test(expected = AvroRuntimeException.class)
    public void testInOnlyWrongMessageName() throws Exception {
        initializeTranceiver();
        Key key = Key.newBuilder().setKey("1").build();
        Value value = Value.newBuilder().setValue("test value").build();
        Object[] request = {key, value};
        requestorMessageInRoute.request("throwException", request);
    }
View Full Code Here

    }

    @Test(expected = AvroRuntimeException.class)
    public void testInOnlyToNotExistingRoute() throws Exception {
        initializeTranceiver();
        Key key = Key.newBuilder().setKey("1").build();
        Value value = Value.newBuilder().setValue("test value").build();
        Object[] request = {key, value};
        requestorForWrongMessages.request("get", request);
    }
View Full Code Here

    @Test
    public void testInOut() throws Exception {
        initializeTranceiver();
        keyValue.getStore().clear();
        Key key = Key.newBuilder().setKey("2").build();
        Value value = Value.newBuilder().setValue("test value").build();
        keyValue.getStore().put(key, value);
        Object[] request = {key};
        Object response = requestor.request("get", request);
        assertEquals(value, response);
View Full Code Here

    @Test
    public void testInOutMessageInRoute() throws Exception {
        initializeTranceiver();
        keyValue.getStore().clear();
        Key key = Key.newBuilder().setKey("2").build();
        Value value = Value.newBuilder().setValue("test value").build();
        keyValue.getStore().put(key, value);
        Object[] request = {key};
        Object response = requestorMessageInRoute.request("get", request);
        assertEquals(value, response);
View Full Code Here

TOP

Related Classes of org.apache.camel.avro.generated.Key

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.