155156157158159160161162163164165
message = createMessage("a.c"); try { _exchange.route(message); message.routingComplete(_store, _context, new MessageHandleFactory()); } catch (AMQException nre) { fail("Message has route and should be routed"); }
175176177178179180181182183184185
message = createMessage("a"); try { _exchange.route(message); message.routingComplete(_store, _context, new MessageHandleFactory()); fail("Message has no route and should fail to be routed"); } catch (AMQException nre) { }
196197198199200201202203204205206
AMQMessage message = createMessage("a.b.c"); try { _exchange.route(message); message.routingComplete(_store, _context, new MessageHandleFactory()); } catch (AMQException nre) { fail("Message has route and should be routed"); }
216217218219220221222223224225226
message = createMessage("a.b"); try { _exchange.route(message); message.routingComplete(_store, _context, new MessageHandleFactory()); } catch (AMQException nre) { fail("Message has route and should be routed"); }
236237238239240241242243244245246
255256257258259260261262263264265
message = createMessage("a"); try { _exchange.route(message); message.routingComplete(_store, _context, new MessageHandleFactory()); } catch (AMQException nre) { fail("Message has route and should be routed"); }
275276277278279280281282283284285
message = createMessage("b"); try { _exchange.route(message); message.routingComplete(_store, _context, new MessageHandleFactory()); fail("Message has no route and should fail to be routed"); } catch (AMQException nre) { }
297298299300301302303304305306307
AMQMessage message = createMessage("a.c.d.b"); try { _exchange.route(message); message.routingComplete(_store, _context, new MessageHandleFactory()); } catch (AMQException nre) { fail("Message has no route and should be routed"); }
316317318319320321322323324325326
message = createMessage("a.c.b"); try { _exchange.route(message); message.routingComplete(_store, _context, new MessageHandleFactory()); } catch (AMQException nre) { fail("Message has no route and should be routed"); }
343344345346347348349350351352353
AMQMessage message = createMessage("a.c.b.b"); try { _exchange.route(message); message.routingComplete(_store, _context, new MessageHandleFactory()); fail("Message has route and should not be routed"); } catch (AMQException nre) { }