Search in sources :

Example 1 with Durations

use of org.sonar.api.utils.Durations in project sonarqube by SonarSource.

the class NotificationFactoryTest method readField.

private static Durations readField(NewIssuesNotification notification, String fieldName) {
    try {
        Field durationsField = NewIssuesNotification.class.getDeclaredField(fieldName);
        durationsField.setAccessible(true);
        Object o = durationsField.get(notification);
        return (Durations) o;
    } catch (IllegalAccessException | NoSuchFieldException e) {
        throw new RuntimeException(e);
    }
}
Also used : Field(java.lang.reflect.Field) Durations(org.sonar.api.utils.Durations)

Aggregations

Field (java.lang.reflect.Field)1 Durations (org.sonar.api.utils.Durations)1