Package org.apache.qpid.server.model

Examples of org.apache.qpid.server.model.Binding


                                queue.delete();
                            }
                        }
                        else if (type.equals("binding")) // delete binding.
                        {
                            Binding binding = nameParser.getBinding();
                            if (binding != null)
                            {
                                binding.delete();
                            }
                        }

                        agent.methodResponse(methodName, handle, outArgs, null);
                    }
View Full Code Here


        verify(_mockExchange).createBinding(BINDING1, _mockQueue1, arguments, Collections.<String, Object>emptyMap());
    }

    public void testRemoveBinding() throws Exception
    {
        Binding mockBinding1 = createBindingOnQueue(BINDING1, _mockQueue1);
        Binding mockBinding2 = createBindingOnQueue(BINDING2, _mockQueue1);
        when(_mockExchange.getBindings()).thenReturn(Arrays.asList(new Binding[] {mockBinding1, mockBinding2}));

        _exchangeMBean.removeBinding(QUEUE1_NAME, BINDING1);
        verify(mockBinding1).delete();
    }
View Full Code Here

        verify(mockBinding1).delete();
    }

    public void testRemoveBindingWhereQueueIsUnknown() throws Exception
    {
        Binding mockBinding1 = createBindingOnQueue(BINDING1, _mockQueue1);
        when(_mockExchange.getBindings()).thenReturn(Arrays.asList(new Binding[] {mockBinding1}));

        try
        {
            _exchangeMBean.removeBinding("unknown", BINDING1);
View Full Code Here

        verify(mockBinding1, never()).delete();
    }

    public void testRemoveBindingWhereBindingNameIsUnknown() throws Exception
    {
        Binding mockBinding1 = createBindingOnQueue(BINDING1, _mockQueue1);
        when(_mockExchange.getBindings()).thenReturn(Arrays.asList(new Binding[] {mockBinding1}));

        try
        {
            _exchangeMBean.removeBinding(QUEUE1_NAME, "unknown");
View Full Code Here

       }
    }

    private Binding createBindingOnQueue(String bindingName, Queue queue)
    {
        Binding mockBinding = mock(Binding.class);
        when(mockBinding.getParent(Queue.class)).thenReturn(queue);
        when(mockBinding.getName()).thenReturn(bindingName);
        return mockBinding;
    }
View Full Code Here

                                queue.deleteAndReturnCount();
                            }
                        }
                        else if (type.equals("binding")) // delete binding.
                        {
                            Binding binding = nameParser.getBinding();
                            if (binding != null)
                            {
                                binding.delete();
                            }
                        }

                        agent.methodResponse(methodName, handle, outArgs, null);
                    }
View Full Code Here

                                queue.delete();
                            }
                        }
                        else if (type.equals("binding")) // delete binding.
                        {
                            Binding binding = nameParser.getBinding();
                            if (binding != null)
                            {
                                binding.delete();
                            }
                        }

                        agent.methodResponse(methodName, handle, outArgs, null);
                    }
View Full Code Here

        verify(_mockExchange).createBinding(BINDING1, _mockQueue1, arguments, Collections.<String, Object>emptyMap());
    }

    public void testRemoveBinding() throws Exception
    {
        Binding mockBinding1 = createBindingOnQueue(BINDING1, _mockQueue1);
        Binding mockBinding2 = createBindingOnQueue(BINDING2, _mockQueue1);
        when(_mockExchange.getBindings()).thenReturn(Arrays.asList(new Binding[] {mockBinding1, mockBinding2}));

        _exchangeMBean.removeBinding(QUEUE1_NAME, BINDING1);
        verify(mockBinding1).delete();
    }
View Full Code Here

        verify(mockBinding1).delete();
    }

    public void testRemoveBindingWhereQueueIsUnknown() throws Exception
    {
        Binding mockBinding1 = createBindingOnQueue(BINDING1, _mockQueue1);
        when(_mockExchange.getBindings()).thenReturn(Arrays.asList(new Binding[] {mockBinding1}));

        try
        {
            _exchangeMBean.removeBinding("unknown", BINDING1);
View Full Code Here

        verify(mockBinding1, never()).delete();
    }

    public void testRemoveBindingWhereBindingNameIsUnknown() throws Exception
    {
        Binding mockBinding1 = createBindingOnQueue(BINDING1, _mockQueue1);
        when(_mockExchange.getBindings()).thenReturn(Arrays.asList(new Binding[] {mockBinding1}));

        try
        {
            _exchangeMBean.removeBinding(QUEUE1_NAME, "unknown");
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.model.Binding

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.