コード例 #1
0
  @Test
  public void testGetNotificationRegistrationStatusAssertReturnNullWhenNotExist() {
    NotificationRegistrationStatusEntity notificationRegistrationStatusEntity =
        new NotificationRegistrationStatusEntity();
    notificationRegistrationStatusEntity.setCode("test");
    notificationRegistrationStatusEntity.setDescription("a description");
    herdDao.saveAndRefresh(notificationRegistrationStatusEntity);

    NotificationRegistrationStatusEntity result =
        notificationRegistrationStatusDao.getNotificationRegistrationStatus("DOES_NOT_EXIST");
    assertNull(result);
  }
コード例 #2
0
  @Test
  public void testGetNotificationRegistrationStatusAssertReturnEntityWhenExistsAndDifferentCase() {
    NotificationRegistrationStatusEntity notificationRegistrationStatusEntity =
        new NotificationRegistrationStatusEntity();
    notificationRegistrationStatusEntity.setCode("test");
    notificationRegistrationStatusEntity.setDescription("a description");
    herdDao.saveAndRefresh(notificationRegistrationStatusEntity);

    NotificationRegistrationStatusEntity result =
        notificationRegistrationStatusDao.getNotificationRegistrationStatus("TEST");
    assertNotNull(result);
    assertEquals("test", result.getCode());
  }