File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed
test/java/org/jvnet/jaxb2_commons/tests/issues Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 54
54
<annox:annotate annox:class="java.lang.Deprecated" />
55
55
</annox:annotate>
56
56
</jaxb:bindings>
57
- <jaxb:bindings node="xsd:complexType[@name='gh36Type']">
57
+ <jaxb:bindings node="xsd:complexType[@name='gh36Type']/xsd:simpleContent/xsd:extension/xsd:attribute[@name='attr'] ">
58
58
<annox:annotate>@com.fasterxml.jackson.annotation.JsonView(java.lang.Object.class)</annox:annotate>
59
59
</jaxb:bindings>
60
+
60
61
</jaxb:bindings>
61
62
</jaxb:bindings>
Original file line number Diff line number Diff line change
1
+ package org .jvnet .jaxb2_commons .tests .issues ;
2
+
3
+ import static org .hamcrest .CoreMatchers .equalTo ;
4
+ import static org .hamcrest .CoreMatchers .is ;
5
+ import static org .hamcrest .CoreMatchers .notNullValue ;
6
+ import static org .junit .Assert .assertThat ;
7
+
8
+ import java .lang .reflect .Method ;
9
+
10
+ import org .junit .Test ;
11
+
12
+ import com .fasterxml .jackson .annotation .JsonView ;
13
+
14
+ public class Gh36Test {
15
+
16
+ @ Test
17
+ public void getAttrMethodIsCorrectlyAnnotated () throws Exception {
18
+
19
+ Method getAttrMethod = Gh36Type .class .getDeclaredMethod ("getAttr" );
20
+ JsonView actualAnnotation = getAttrMethod .getAnnotation (JsonView .class );
21
+
22
+ assertThat (actualAnnotation , is (notNullValue ()));
23
+ assertThat (actualAnnotation .value (), is (equalTo (new Class []{Object .class })));
24
+ }
25
+ }
You can’t perform that action at this time.
0 commit comments