FIX: typeGetAll did not work with repeated annotations on one class

This commit is contained in:
Jonas Pöhler
2021-11-16 11:24:22 +01:00
committed by Noemi Szemenyei
parent 5807874c9e
commit 2d26740286
2 changed files with 31 additions and 4 deletions
@@ -0,0 +1,28 @@
package io.ebean.util;
import static org.assertj.core.api.Assertions.assertThat;
import java.io.File;
import java.util.Set;
import org.junit.jupiter.api.Test;
import io.ebean.annotation.Formula;
public class TestAnnotationUtil {
@Formula(select = "x")
@Formula(select = "y")
private static class TestObject {
}
@Test
public void testRepeatableAnnotation() {
Set<Formula> list = AnnotationUtil.typeGetAll(TestObject.class, Formula.class);
assertThat(list).hasSize(2);
}
}