Пример #1
0
 @Test
 public void onlyHost() throws Exception {
   Target t = parser.parse("localhost");
   assertNull(t.getProvider());
   assertNull(t.getUsername());
   assertNull(t.getPassword());
   assertEquals("localhost", t.getHost());
   assertNull(t.getDestination());
   assertNull(t.getPort());
 }
Пример #2
0
 @Test
 public void withoutProvider() throws Exception {
   Target t = parser.parse("myuser:mypass@localhost:5445/queue.testing");
   assertNull(t.getProvider());
   assertEquals("myuser", t.getUsername());
   assertEquals("mypass", t.getPassword());
   assertEquals("localhost", t.getHost());
   assertEquals("queue.testing", t.getDestination());
   assertEquals(5445, t.getPort().intValue());
 }