Examples of asObjectRecord()


Examples of org.apache.qpid.server.exchange.ExchangeImpl.asObjectRecord()

    public void testRemoveExchange() throws Exception
    {
        ExchangeImpl exchange = createTestExchange();
        _configStore.create(exchange.asObjectRecord());

        _configStore.remove(exchange.asObjectRecord());

        reopenStore();
        verify(_handler, never()).handle(any(ConfiguredObjectRecord.class));
    }
View Full Code Here

Examples of org.apache.qpid.server.exchange.ExchangeImpl.asObjectRecord()

        ConfiguredObjectRecord exchangeRecord = mock(ConfiguredObjectRecord.class);
        when(exchangeRecord.getId()).thenReturn(_exchangeId);
        when(exchangeRecord.getType()).thenReturn(Exchange.class.getSimpleName());
        when(exchangeRecord.getAttributes()).thenReturn(actualAttributes);
        when(exchangeRecord.getParents()).thenReturn(Collections.singletonMap(_rootRecord.getType(), _rootRecord.getId()));
        when(exchange.asObjectRecord()).thenReturn(exchangeRecord);
        when(exchange.getEventLogger()).thenReturn(new EventLogger());
        return exchange;
    }

    private void reopenStore() throws Exception
View Full Code Here

Examples of org.apache.qpid.server.exchange.ExchangeImpl.asObjectRecord()

    }

    public void testCreateExchange() throws Exception
    {
        ExchangeImpl exchange = createTestExchange();
        _configStore.create(exchange.asObjectRecord());

        reopenStore();
        _configStore.visitConfiguredObjectRecords(_handler);

        verify(_handler).handle(matchesRecord(_exchangeId, EXCHANGE,
View Full Code Here

Examples of org.apache.qpid.server.exchange.ExchangeImpl.asObjectRecord()

    }

    public void testRemoveExchange() throws Exception
    {
        ExchangeImpl exchange = createTestExchange();
        _configStore.create(exchange.asObjectRecord());

        _configStore.remove(exchange.asObjectRecord());

        reopenStore();
        verify(_handler, never()).handle(any(ConfiguredObjectRecord.class));
View Full Code Here

Examples of org.apache.qpid.server.exchange.ExchangeImpl.asObjectRecord()

    public void testRemoveExchange() throws Exception
    {
        ExchangeImpl exchange = createTestExchange();
        _configStore.create(exchange.asObjectRecord());

        _configStore.remove(exchange.asObjectRecord());

        reopenStore();
        verify(_handler, never()).handle(any(ConfiguredObjectRecord.class));
    }
View Full Code Here

Examples of org.apache.qpid.server.exchange.ExchangeImpl.asObjectRecord()

        ConfiguredObjectRecord exchangeRecord = mock(ConfiguredObjectRecord.class);
        when(exchangeRecord.getId()).thenReturn(_exchangeId);
        when(exchangeRecord.getType()).thenReturn(Exchange.class.getSimpleName());
        when(exchangeRecord.getAttributes()).thenReturn(actualAttributes);
        when(exchangeRecord.getParents()).thenReturn(Collections.singletonMap(_rootRecord.getType(), _rootRecord.getId()));
        when(exchange.asObjectRecord()).thenReturn(exchangeRecord);
        when(exchange.getEventLogger()).thenReturn(new EventLogger());
        return exchange;
    }

    private void reopenStore() throws Exception
View Full Code Here

Examples of org.apache.qpid.server.model.ConfiguredObject.asObjectRecord()

        notifyBrokerStarted();
        UUID id = UUID.randomUUID();
        ConfiguredObject object = mock(VirtualHost.class);
        when(object.getId()).thenReturn(id);
        ConfiguredObjectRecord record = mock(ConfiguredObjectRecord.class);
        when(object.asObjectRecord()).thenReturn(record);
        _listener.stateChanged(object, State.ACTIVE, State.DELETED);
        verify(_store).remove(record);
    }

    public void testChildAdded()
View Full Code Here

Examples of org.apache.qpid.server.model.ConfiguredObject.asObjectRecord()

        notifyBrokerStarted();
        UUID id = UUID.randomUUID();
        ConfiguredObject object = mock(VirtualHost.class);
        when(object.getId()).thenReturn(id);
        ConfiguredObjectRecord record = mock(ConfiguredObjectRecord.class);
        when(object.asObjectRecord()).thenReturn(record);
        _listener.stateChanged(object, State.ACTIVE, State.DELETED);
        verify(_store).remove(record);
    }

    public void testChildAdded()
View Full Code Here

Examples of org.apache.qpid.server.model.testmodel.TestRootCategory.asObjectRecord()

        assertEquals(objectName, object.getName());
        assertNull(object.getAutomatedNonPersistedValue());
        assertNull(object.getAutomatedPersistedValue());

        ConfiguredObjectRecord record = object.asObjectRecord();

        assertEquals(objectName, record.getAttributes().get(ConfiguredObject.NAME));

        assertFalse(record.getAttributes().containsKey(TestRootCategory.AUTOMATED_PERSISTED_VALUE));
        assertFalse(record.getAttributes().containsKey(TestRootCategory.AUTOMATED_NONPERSISTED_VALUE));
View Full Code Here

Examples of org.apache.qpid.server.model.testmodel.TestRootCategory.asObjectRecord()

        object.setAttributes(updatedAttributes);

        assertEquals(newValue, object.getAutomatedPersistedValue());
        assertEquals(newValue, object.getAutomatedNonPersistedValue());

        record = object.asObjectRecord();
        assertEquals(objectName, record.getAttributes().get(ConfiguredObject.NAME));
        assertEquals(newValue, record.getAttributes().get(TestRootCategory.AUTOMATED_PERSISTED_VALUE));

        assertFalse(record.getAttributes().containsKey(TestRootCategory.AUTOMATED_NONPERSISTED_VALUE));
View Full Code Here
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.