Package org.apache.qpid.server.util

Examples of org.apache.qpid.server.util.MapJsonSerializer


        Set<String> expectedTypes = new HashSet<String>();
        expectedTypes.add(Queue.class.getName());
        expectedTypes.add(Exchange.class.getName());
        expectedTypes.add(Binding.class.getName());
        MapJsonSerializer jsonSerializer = new MapJsonSerializer();
        for (Entry<UUID, UpgradeConfiguredObjectRecord> entry : configuredObjects.entrySet())
        {
            UpgradeConfiguredObjectRecord object = entry.getValue();
            Map<String, Object> deserialized = jsonSerializer.deserialize(object.getAttributes());

            assertTrue("Unexpected entry in a store - json [" + object.getAttributes() + "], map [" + deserialized + "]",
                    expected.remove(deserialized));
            String type = object.getType();
            assertTrue("Unexpected type:" + type, expectedTypes.contains(type));
View Full Code Here


        Set<String> expectedTypes = new HashSet<String>();
        expectedTypes.add(Queue.class.getName());
        expectedTypes.add(Exchange.class.getName());
        expectedTypes.add(Binding.class.getName());
        MapJsonSerializer jsonSerializer = new MapJsonSerializer();
        for (Entry<UUID, UpgradeConfiguredObjectRecord> entry : configuredObjects.entrySet())
        {
            UpgradeConfiguredObjectRecord object = entry.getValue();
            Map<String, Object> deserialized = jsonSerializer.deserialize(object.getAttributes());
            assertTrue("Unexpected entry:" + object.getAttributes(), expected.remove(deserialized));
            String type = object.getType();
            assertTrue("Unexpected type:" + type, expectedTypes.contains(type));
            UUID key = entry.getKey();
View Full Code Here

        Set<String> expectedTypes = new HashSet<String>();
        expectedTypes.add(Queue.class.getName());
        expectedTypes.add(Exchange.class.getName());
        expectedTypes.add(Binding.class.getName());
        MapJsonSerializer jsonSerializer = new MapJsonSerializer();
        for (Entry<UUID, UpgradeConfiguredObjectRecord> entry : configuredObjects.entrySet())
        {
            UpgradeConfiguredObjectRecord object = entry.getValue();
            Map<String, Object> deserialized = jsonSerializer.deserialize(object.getAttributes());

            assertTrue("Unexpected entry in a store - json [" + object.getAttributes() + "], map [" + deserialized + "]",
                    expected.remove(deserialized));
            String type = object.getType();
            assertTrue("Unexpected type:" + type, expectedTypes.contains(type));
View Full Code Here

        Set<String> expectedTypes = new HashSet<String>();
        expectedTypes.add(Queue.class.getName());
        expectedTypes.add(Exchange.class.getName());
        expectedTypes.add(Binding.class.getName());
        MapJsonSerializer jsonSerializer = new MapJsonSerializer();
        for (Entry<UUID, UpgradeConfiguredObjectRecord> entry : configuredObjects.entrySet())
        {
            UpgradeConfiguredObjectRecord object = entry.getValue();
            Map<String, Object> deserialized = jsonSerializer.deserialize(object.getAttributes());

            assertTrue("Unexpected entry in a store - json [" + object.getAttributes() + "], map [" + deserialized + "]",
                    expected.remove(deserialized));
            String type = object.getType();
            assertTrue("Unexpected type:" + type, expectedTypes.contains(type));
View Full Code Here

        expected.putAll(createExpectedExchangeMap("amq.direct", "direct"));
        expected.putAll(createExpectedExchangeMap("amq.fanout", "fanout"));
        expected.putAll(createExpectedExchangeMap("amq.match", "headers"));
        expected.putAll(createExpectedExchangeMap("amq.topic", "topic"));

        MapJsonSerializer jsonSerializer = new MapJsonSerializer();
        for (Entry<UUID, UpgradeConfiguredObjectRecord> entry : configuredObjects.entrySet())
        {
            UpgradeConfiguredObjectRecord object = entry.getValue();

            UUID actualKey = entry.getKey();
            String actualType = object.getType();
            String actualJson = object.getAttributes();
            Map<String, Object> actualDeserializedAttributes = jsonSerializer.deserialize(actualJson);

            assertTrue("Entry UUID " + actualKey + " of type " +  actualType + " is unexpected", expected.containsKey(actualKey));

            Map<String, Object> expectedDeserializedAttributes = expected.get(actualKey);
View Full Code Here

        Set<String> expectedTypes = new HashSet<String>();
        expectedTypes.add(Queue.class.getName());
        expectedTypes.add(Exchange.class.getName());
        expectedTypes.add(Binding.class.getName());
        MapJsonSerializer jsonSerializer = new MapJsonSerializer();
        for (Entry<UUID, UpgradeConfiguredObjectRecord> entry : configuredObjects.entrySet())
        {
            UpgradeConfiguredObjectRecord object = entry.getValue();
            Map<String, Object> deserialized = jsonSerializer.deserialize(object.getAttributes());

            assertTrue("Unexpected entry in a store - json [" + object.getAttributes() + "], map [" + deserialized + "]",
                    expected.remove(deserialized));
            String type = object.getType();
            assertTrue("Unexpected type:" + type, expectedTypes.contains(type));
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.util.MapJsonSerializer

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.