use of javax.lang.model.element.AnnotationValue in project auto by google.
the class AnnotationValuesTest method getFloats.
@Test
public void getFloats() {
AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, "floatValues");
assertThat(AnnotationValues.getFloats(value)).containsExactly(14F, 15F).inOrder();
}
use of javax.lang.model.element.AnnotationValue in project auto by google.
the class AnnotationValuesTest method getStrings.
@Test
public void getStrings() {
AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, "stringValues");
assertThat(AnnotationValues.getStrings(value)).containsExactly("it's", "me").inOrder();
}
use of javax.lang.model.element.AnnotationValue in project auto by google.
the class AnnotationValuesTest method getBooleans.
@Test
public void getBooleans() {
AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, "booleanValues");
assertThat(AnnotationValues.getBooleans(value)).containsExactly(true, false).inOrder();
}
use of javax.lang.model.element.AnnotationValue in project auto by google.
the class AnnotationValuesTest method getTypeMirrorGenericClass.
@Test
public void getTypeMirrorGenericClass() {
TypeElement genericClass = getTypeElement(GenericClass.class);
AnnotationValue gvalue = AnnotationMirrors.getAnnotationValue(annotationMirror, "genericClassValue");
assertThat(AnnotationValues.getTypeMirror(gvalue).asElement()).isEqualTo(genericClass);
}
use of javax.lang.model.element.AnnotationValue in project auto by google.
the class AnnotationValuesTest method getChars.
@Test
public void getChars() {
AnnotationValue value = AnnotationMirrors.getAnnotationValue(annotationMirror, "charValues");
assertThat(AnnotationValues.getChars(value)).containsExactly('b', 'c').inOrder();
}
Aggregations