Package org.sonar.core.notification.db

Examples of org.sonar.core.notification.db.NotificationQueueDto


  }

  @Test
  public void shouldGetFromQueueAndDelete() throws Exception {
    Notification notification = new Notification("test");
    NotificationQueueDto dto = NotificationQueueDto.toNotificationQueueDto(notification);
    List<NotificationQueueDto> dtos = Arrays.asList(dto);
    when(notificationQueueDao.findOldest(1)).thenReturn(dtos);

    assertThat(manager.getFromQueue()).isNotNull();
View Full Code Here


  }

  // SONAR-4739
  @Test
  public void shouldNotFailWhenUnableToDeserialize() throws Exception {
    NotificationQueueDto dto1 = mock(NotificationQueueDto.class);
    when(dto1.toNotification()).thenThrow(new InvalidClassException("Pouet"));
    List<NotificationQueueDto> dtos = Arrays.asList(dto1);
    when(notificationQueueDao.findOldest(1)).thenReturn(dtos);

    manager = spy(manager);
    assertThat(manager.getFromQueue()).isNull();
View Full Code Here

  /**
   * {@inheritDoc}
   */
  @Override
  public void scheduleForSending(Notification notification) {
    NotificationQueueDto dto = NotificationQueueDto.toNotificationQueueDto(notification);
    notificationQueueDao.insert(Arrays.asList(dto));
  }
View Full Code Here

TOP

Related Classes of org.sonar.core.notification.db.NotificationQueueDto

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.