Home
last modified time | relevance | path

Searched refs:Bean (Results 1 – 25 of 56) sorted by relevance

123

/external/snakeyaml/src/test/java/org/yaml/snakeyaml/
DCollectionWithBeanYamlTest.java29 Map<String, Bean> data = new TreeMap<String, Bean>(); in testYamlMap()
30 data.put("gold1", new Bean()); in testYamlMap()
31 data.put("gold2", new Bean()); in testYamlMap()
41 Map<String, Bean> m = (Map<String, Bean>) o; in testYamlMap()
42 assertTrue(m.get("gold1") instanceof Bean); in testYamlMap() local
43 assertTrue("" + m.get("gold2").getClass(), m.get("gold2") instanceof Bean); in testYamlMap()
48 List<Bean> data = new ArrayList<Bean>(); in testYamlList()
49 data.add(new Bean("1")); in testYamlList()
50 data.add(new Bean("2")); in testYamlList()
60 List<Bean> m = (List<Bean>) o; in testYamlList()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/
DTestRootName.java16 static class Bean { class in TestRootName
34 String json = mapper.writeValueAsString(new Bean()); in testRootViaMapper()
36 Bean bean = mapper.readValue(json, Bean.class); in testRootViaMapper()
52 mapper.readValue(aposToQuotes("{'notRudy':{'a':3}}"), Bean.class); in testRootViaMapperFails()
60 mapper.readValue(aposToQuotes("[{'rudy':{'a':3}}]"), Bean.class); in testRootViaMapperFails()
68 mapper.readValue(aposToQuotes("{}]"), Bean.class); in testRootViaMapperFails()
76 mapper.readValue(aposToQuotes("{'rudy':{'a':3}, 'extra':3}"), Bean.class); in testRootViaMapperFails()
86 final ObjectReader reader = rootMapper().readerFor(Bean.class); in testRootViaReaderFails()
124 String json = mapper.writer().writeValueAsString(new Bean()); in testRootViaWriterAndReader()
126 Bean bean = mapper.readerFor(Bean.class).readValue(json); in testRootViaWriterAndReader()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/ser/
DCyclicTypeSerTest.java19 static class Bean class in CyclicTypeSerTest
21 Bean _next;
24 public Bean(Bean next, String name) { in Bean() method in CyclicTypeSerTest.Bean
29 public Bean getNext() { return _next; } in getNext()
32 public void assignNext(Bean n) { _next = n; } in assignNext()
59 Bean last = new Bean(null, "last"); in testLinkedButNotCyclic()
60 Bean first = new Bean(last, "first"); in testLinkedButNotCyclic()
76 Bean selfRef = new Bean(null, "self-refs"); in testSimpleDirectSelfReference()
77 Bean first = new Bean(selfRef, "first"); in testSimpleDirectSelfReference()
79 Bean[] wrapper = new Bean[] { first }; in testSimpleDirectSelfReference()
DBeanSerializerModifierTest.java49 static class Bean { class in BeanSerializerModifierTest
261 Bean bean = new Bean();
269 Bean bean = new Bean();
277 Bean bean = new Bean();
284 Bean bean = new Bean();
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/seq/
DSequenceWriterTest.java20 static class Bean { class in SequenceWriterTest
23 public Bean(int value) { a = value; } in Bean() method in SequenceWriterTest.Bean
28 Bean other = (Bean) o; in equals()
100 .forType(Bean.class) in testSimpleNonArray()
102 w.write(new Bean(13)) in testSimpleNonArray()
103 .write(new Bean(-6)) in testSimpleNonArray()
104 .writeAll(new Bean[] { new Bean(3), new Bean(1) }) in testSimpleNonArray()
105 .writeAll(Arrays.asList(new Bean(5), new Bean(7))) in testSimpleNonArray()
116 w.write(new Bean(1)) in testSimpleNonArray()
117 .write(new Bean(2)); in testSimpleNonArray()
[all …]
DReadValuesTest.java17 static class Bean { class in ReadValuesTest
23 Bean other = (Bean) o; in equals()
87 MappingIterator<Bean> it = _iterator(MAPPER.readerFor(Bean.class), in _testRootBeans()
91 Bean b = it.next(); in _testRootBeans()
100 it = _iterator(MAPPER.readerFor(Bean.class), JSON, srcType); in _testRootBeans()
101 List<Bean> all = it.readAll(); in _testRootBeans()
105 it = _iterator(MAPPER.readerFor(Bean.class), "{\"a\":3}{\"a\":3}", srcType); in _testRootBeans()
106 Set<Bean> set = it.readAll(new HashSet<Bean>()); in _testRootBeans()
117 MappingIterator<Bean> it = MAPPER.readerFor(Bean.class).readValues(JSON); in testRootBeansInArray()
121 Bean b = it.next(); in testRootBeansInArray()
[all …]
DReadRecoveryTest.java11 static class Bean { class in ReadRecoveryTest
28 MappingIterator<Bean> it = MAPPER.readerFor(Bean.class).readValues(JSON); in testRootBeans()
31 Bean bean = it.nextValue(); in testRootBeans()
53 MappingIterator<Bean> it = MAPPER.readerFor(Bean.class).readValues(JSON); in testSimpleRootRecovery()
54 Bean bean = it.nextValue(); in testSimpleRootRecovery()
82 MappingIterator<Bean> it = MAPPER.readerFor(Bean.class).readValues(JSON); in testSimpleArrayRecovery()
83 Bean bean = it.nextValue(); in testSimpleArrayRecovery()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/merge/
DUpdateValueTest.java10 static class Bean class in UpdateValueTest
16 public Bean(@JsonProperty("a") String a, @JsonProperty("b") String b) in Bean() method in UpdateValueTest.Bean
44 Bean bean = new Bean("abc", "def"); in testValueUpdateWithCreator()
45 … MAPPER.readerFor(Bean.class).withValueToUpdate(bean).readValue("{\"a\":\"ghi\",\"b\":\"jkl\"}"); in testValueUpdateWithCreator()
52 Bean bean = new Bean("abc", "def"); in testValueUpdateOther()
53 ObjectReader r = MAPPER.readerFor(Bean.class).withValueToUpdate(bean); in testValueUpdateOther()
57 Bean result = r.readValue(aposToQuotes("{'a':'x'}")); in testValueUpdateOther()
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/issues/issue61/
DGenericListBeanTest.java47 ListProvider<Bean> listProvider = new ListProvider<Bean>(); in testGenericBean()
48 Bean foo = new Bean(); in testGenericBean()
51 Bean bar = new Bean(); in testGenericBean()
62 Bean foo2 = (Bean) listProvider2.getList().get(0); in testGenericBean()
65 Bean bar2 = (Bean) listProvider2.getList().get(1); in testGenericBean()
97 public static class Bean { class in GenericListBeanTest
DGenericMapBeanTest.java48 MapProvider<String, Bean> listProvider = new MapProvider<String, Bean>(); in testGenericBean()
49 Bean foo = new Bean(); in testGenericBean()
52 Bean bar = new Bean(); in testGenericBean()
63 Bean foo2 = (Bean) listProvider2.getMap().get("foo"); in testGenericBean()
66 Bean bar2 = (Bean) listProvider2.getMap().get("bar"); in testGenericBean()
98 public static class Bean { class in GenericMapBeanTest
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/ser/filter/
DTestJsonFilter.java21 static class Bean { class in TestJsonFilter
100 public Bean first = new Bean();
104 public Bean second = new Bean();
119 assertEquals("{\"a\":\"a\"}", MAPPER.writer(prov).writeValueAsString(new Bean())); in testSimpleInclusionFilter()
124 assertEquals("{\"a\":\"a\"}", mapper.writeValueAsString(new Bean())); in testSimpleInclusionFilter()
131 … assertEquals("{\"a\":\"a\",\"b\":\"b\"}", MAPPER.writer(prov).writeValueAsString(new Bean())); in testIncludeAllFilter()
138 assertEquals("{\"b\":\"b\"}", MAPPER.writer(prov).writeValueAsString(new Bean())); in testSimpleExclusionFilter()
146 MAPPER.writeValueAsString(new Bean()); in testMissingFilter()
156 String json = mapper.writeValueAsString(new Bean()); in testMissingFilter()
164 assertEquals("{\"b\":\"b\"}", MAPPER.writer(prov).writeValueAsString(new Bean())); in testDefaultFilter()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/
DTestConcurrency.java22 static class Bean class in TestConcurrency
38 extends JsonDeserializer<Bean>
44 …public Bean deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProces… in deserialize()
49 Bean b = new Bean(); in deserialize()
83 /*Bean b =*/ mapper.readValue(JSON, Bean.class); in testDeserializerResolution()
92 Bean b = mapper.readValue(JSON, Bean.class); in testDeserializerResolution()
DCyclicTypesDeserTest.java15 static class Bean class in CyclicTypesDeserTest
17 Bean _next;
20 public Bean() { } in Bean() method in CyclicTypesDeserTest.Bean
22 public void setNext(Bean b) { _next = b; } in setNext()
64 Bean first = MAPPER.readValue in testLinked()
67 Bean.class); in testLinked()
71 Bean last = first._next; in testLinked()
DTestStatics.java14 static class Bean class in TestStatics
33 Bean result = m.readValue("{ \"x\":3}", Bean.class); in testSimpleIgnore()
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/issues/issue38/
DBigNumberIdTest.java31 List<Bean> list = new ArrayList<Bean>(2000); in testBigNumberFormat()
33 Bean value = new Bean(i); in testBigNumberFormat()
41 List<Bean> list2 = (List<Bean>) yaml.load(output); in testBigNumberFormat()
42 for (Bean bean : list2) { in testBigNumberFormat()
DBean.java18 public class Bean { class
21 public Bean() { in Bean() method in Bean
24 public Bean(int value) { in Bean() method in Bean
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/builder/
DBuilderInfiniteLoop1978Test.java27 public Bean build() in build()
29 Bean bean = new Bean(id); in build()
36 static class Bean class in BuilderInfiniteLoop1978Test
41 public Bean(int id) { in Bean() method in BuilderInfiniteLoop1978Test.Bean
92 Bean bean = mapper.readValue( json, Bean.class ); in testInfiniteLoop1978()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/convert/
DCoercePojosTest.java12 static class Bean { class in CoercePojosTest
97 Bean b = _verifyFromEmptyPass(mapper, json); in _testPOJOFromEmptyGlobalConfig()
123 Bean b = _verifyFromEmptyPass(mapper, json); in _testPOJOFromEmptyLogicalTypeConfig()
143 mapper.coercionConfigFor(Bean.class).setCoercion(shape, CoercionAction.AsNull) in _testPOJOFromEmptyPhysicalTypeConfig()
149 mapper.coercionConfigFor(Bean.class).setCoercion(shape, CoercionAction.AsEmpty) in _testPOJOFromEmptyPhysicalTypeConfig()
151 Bean b = _verifyFromEmptyPass(mapper, json); in _testPOJOFromEmptyPhysicalTypeConfig()
158 mapper.coercionConfigFor(Bean.class).setCoercion(shape, CoercionAction.Fail); in _testPOJOFromEmptyPhysicalTypeConfig()
162 private Bean _verifyFromEmptyPass(ObjectMapper m, String json) throws Exception { in _verifyFromEmptyPass()
166 private Bean _verifyFromEmptyPass(ObjectReader r, String json) throws Exception in _verifyFromEmptyPass()
168 return r.forType(Bean.class) in _verifyFromEmptyPass()
[all …]
DTestMapConversions.java17 static class Bean { class in TestMapConversions
75 Bean bean = MAPPER.convertValue(map, Bean.class); in testMapToBean()
82 Bean bean = new Bean(); in testBeanToMap()
104 Bean bean = new Bean(); in testMapToProperties()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/exc/
DTestExceptionsDuringWriting.java25 static class Bean { class in TestExceptionsDuringWriting
30 extends JsonSerializer<Bean>
33 public void serialize(Bean value, JsonGenerator jgen, SerializerProvider provider) in serialize()
54 module.addSerializer(Bean.class, new SerializerWithErrors()); in testCatchAndRethrow()
61 Bean[] b = { new Bean() }; in testCatchAndRethrow()
62 List<Bean[]> l = new ArrayList<Bean[]>(); in testCatchAndRethrow()
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/issues/issue127/
DNullAliasTest.java33 Bean bean = new Bean(); in testRespresenter()
43 this.representers.put(Bean.class, new RepresentBean()); in BeanRepresenter()
48 Bean bean = (Bean) data; in representData()
/external/mockito/src/test/java/org/mockitousage/bugs/injection/
DInjectionByTypeShouldFirstLookForExactTypeThenAncestorTest.java22 @Mock private Bean mockedBean;
54 public static class Bean {} class in InjectionByTypeShouldFirstLookForExactTypeThenAncestorTest
58 public Bean mockShouldGoInHere;
62 public Bean mockShouldGoInHere;
67 Bean injectMePlease;
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/views/
DTestViewDeserialization.java17 static class Bean class in TestViewDeserialization
67 Bean bean = mapper in testSimple()
68 .readValue("{\"a\":3, \"aa\":\"foo\", \"b\": 9 }", Bean.class); in testSimple()
75 .forType(Bean.class) in testSimple()
84 .forType(Bean.class) in testSimple()
90 bean = mapper.readerFor(Bean.class) in testSimple()
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/issues/issue48/
DSkipJavaBeanPropertyTest.java28 Bean bean = new Bean(); in testWithNull()
37 Bean bean = new Bean(); in testWithoutNull()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/failing/
DAnyPropSorting518Test.java14 static class Bean class in AnyPropSorting518Test
22 public Bean(int a, int b, Map<String,Object> x) { in Bean() method in AnyPropSorting518Test.Bean
45 String json = MAPPER.writeValueAsString(new Bean(1, 2, extra)); in testAnyBeanWithSort()

123