コード例 #1
0
 @Test
 public void shouldFindQueue() {
   String queueName = "testqueue";
   InMemoryQueue queue = new InMemoryQueue();
   queue.setName(queueName);
   inMemoryQueueRepository.save(queueName, queue);
   InMemoryQueue savedqueue = inMemoryQueueRepository.find(queueName);
   assertNotNull(savedqueue);
 }
コード例 #2
0
 @Test(expected = NoSuchElementException.class)
 public void shouldThrowNoSuchElementException() {
   String queueName = "unknownqueue";
   inMemoryQueueRepository.find(queueName);
   fail("Exception not thrown");
 }