コード例 #1
0
 @Test
 public void testDtoConversation() throws Exception {
   CassandraEndpointNotification notification = generateEndpointNotification(null, 1).get(0);
   Assert.assertNull(notification.getId());
   EndpointNotificationDto notificationDto = notification.toDto();
   CassandraEndpointNotification cassandraEndpointNotification =
       new CassandraEndpointNotification(notificationDto);
   Assert.assertEquals(notificationDto, cassandraEndpointNotification.toDto());
 }
コード例 #2
0
 @Test
 public void testFindById() {
   CassandraEndpointNotification notification = generateEndpointNotification(null, 1).get(0);
   CassandraEndpointNotification saved = unicastNotificationDao.save(notification.toDto());
   Assert.assertNotNull(saved.getId());
   CassandraEndpointNotification found = unicastNotificationDao.findById(saved.getId());
   Assert.assertEquals(saved, found);
 }