Home
last modified time | relevance | path

Searched refs:bean (Results 1 – 25 of 122) sorted by relevance

12345

/external/snakeyaml/src/test/java/org/yaml/snakeyaml/javabeans/
DConstructEmptyBeanTest.java30 EmptyBean bean = (EmptyBean) yaml in testEmptyBean() local
32 assertNotNull(bean); in testEmptyBean()
33 assertNull(bean.getFirstName()); in testEmptyBean()
34 assertEquals(5, bean.getHatSize()); in testEmptyBean()
42 EmptyBean bean = beanLoader.loadAs( in testEmptyBean1() local
45 assertNotNull(bean); in testEmptyBean1()
46 assertNull(bean.getFirstName()); in testEmptyBean1()
47 assertEquals(5, bean.getHatSize()); in testEmptyBean1()
55 EmptyBean bean = beanLoader.loadAs("!!Bla-bla-bla {}", EmptyBean.class); in testEmptyBean2() local
56 assertNotNull(bean); in testEmptyBean2()
[all …]
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/issues/issue124/
DDumpTest.java29 Bean124 bean = new Bean124(); in testDumperOptionsSideEffect() local
30 String output0 = yaml.dump(bean); in testDumperOptionsSideEffect()
34 String output1 = yaml.dumpAsMap(bean); in testDumperOptionsSideEffect()
37 String output2 = yaml.dump(bean); in testDumperOptionsSideEffect()
44 Bean124 bean = new Bean124(); in testDumperDifferentTag() local
45 String output1 = yaml.dumpAs(bean, new Tag("!!foo.bar"), FlowStyle.BLOCK); in testDumperDifferentTag()
51 Bean124 bean = new Bean124(); in testDumperFlowStyle() local
52 String output1 = yaml.dumpAs(bean, new Tag("!!foo.bar"), FlowStyle.FLOW); in testDumperFlowStyle()
58 Bean124 bean = new Bean124(); in testDumperAutoStyle() local
59 String output1 = yaml.dumpAs(bean, new Tag("!!foo.bar"), FlowStyle.AUTO); in testDumperAutoStyle()
[all …]
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/issues/issue49/
DCalendarTest.java32 CalendarBean bean = new CalendarBean(); in testDumpDstIgnored() local
33 bean.setName("lunch"); in testDumpDstIgnored()
37 bean.setCalendar(cal); in testDumpDstIgnored()
39 String output = yaml.dumpAsMap(bean); in testDumpDstIgnored()
45 assertEquals(bean.getCalendar(), parsed.getCalendar()); in testDumpDstIgnored()
82 CalendarBean bean = new CalendarBean(); in check() local
83 bean.setName("lunch"); in check()
87 bean.setCalendar(cal); in check()
89 String output = yaml.dumpAsMap(bean); in check()
95 assertFalse("TimeZone must deviate.", bean.getCalendar().equals(parsed.getCalendar())); in check()
[all …]
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/representer/
DFilterPropertyToDumpTest.java31 BeanToRemoveProperty bean = new BeanToRemoveProperty(); in testFilterPropertyInJavaBeanDumper() local
32 bean.setNumber(24); in testFilterPropertyInJavaBeanDumper()
33 bean.setId("ID124"); in testFilterPropertyInJavaBeanDumper()
35 String dump = d.dumpAsMap(bean); in testFilterPropertyInJavaBeanDumper()
41 BeanToRemoveProperty bean = new BeanToRemoveProperty(); in testFilterPropertyInYaml() local
42 bean.setNumber(25); in testFilterPropertyInYaml()
43 bean.setId("ID125"); in testFilterPropertyInYaml()
45 String dump = yaml.dumpAsMap(bean); in testFilterPropertyInYaml()
51 BeanToRemoveProperty bean = new BeanToRemoveProperty(); in testDoNotFilterPropertyIncludeReadOnly() local
52 bean.setNumber(26); in testDoNotFilterPropertyIncludeReadOnly()
[all …]
DRepresenterTest.java27 MyBean bean = new MyBean(); in testRepresenter() local
28 bean.setName("Gnome"); in testRepresenter()
29 bean.setValid(true); in testRepresenter()
30 bean.setPrimitive(true); in testRepresenter()
34 yaml.dump(bean)); in testRepresenter()
68 MyBean2 bean = new MyBean2("Gnome", true); in testRepresenterNoConstructorAvailable() local
73 yaml.dump(bean)); in testRepresenterNoConstructorAvailable()
105 MyBean3 bean = new MyBean3("Gnome", false); in testRepresenterGetterWithException() local
110 String str = yaml.dump(bean); in testRepresenterGetterWithException()
169 EmptyBean bean = new EmptyBean(); in testRepresenterEmptyBean() local
[all …]
DRepresentFieldTest.java26 WrongJavaBean bean = new WrongJavaBean(); in testRepresent1() local
27 bean.packageField = "Value";// the field is present in testRepresent1()
28 bean.publicField = "Michael Jackson"; in testRepresent1()
30 String output = yaml.dump(bean); in testRepresent1()
38 WrongJavaBean bean = new WrongJavaBean(); in testWrongNotPublicField() local
39 bean.packageField = "Value";// the field is present in testWrongNotPublicField()
DRepresentTest.java34 CustomBean bean = (CustomBean) yaml.load(output); in testCustomRepresenter() local
35 assertEquals("A", bean.getPrefix()); in testCustomRepresenter()
36 assertEquals(1, bean.getSuffix()); in testCustomRepresenter()
37 assertEquals(etalon, bean); in testCustomRepresenter()
59 CustomBean bean = (CustomBean) obj; in equals() local
60 return prefix.equals(bean.getPrefix()) && suffix == bean.getSuffix(); in equals()
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/issues/issue9/
DBeanHolder.java22 private IBean bean = new Bean1(); field in BeanHolder
28 public BeanHolder(IBean bean) { in BeanHolder() argument
30 this.bean = bean; in BeanHolder()
34 return bean; in getBean()
37 public void setBean(IBean bean) { in setBean() argument
38 this.bean = bean; in setBean()
44 builder.append(this.bean); in toString()
/external/snakeyaml/src/test/java/examples/staticstate/
DStaticFieldsWrapperTest.java35 JavaBeanWithStaticState bean = new JavaBeanWithStaticState(); in testWrapper() local
36 bean.setName("Bahrack"); in testWrapper()
37 bean.setAge(-47); in testWrapper()
41 String output = yaml.dump(new Wrapper(bean)); in testWrapper()
57 JavaBeanWithStaticState bean = new JavaBeanWithStaticState(); in testLocalTag() local
58 bean.setName("Bahrack"); in testLocalTag()
59 bean.setAge(-47); in testLocalTag()
65 String output = yaml.dump(new Wrapper(bean)); in testLocalTag()
83 JavaBeanWithStaticState bean = new JavaBeanWithStaticState(); in testRootBean() local
84 bean.setName("Bahrack"); in testRootBean()
[all …]
DWrapper.java25 JavaBeanWithStaticState bean = new JavaBeanWithStaticState(); in createBean() local
26 bean.setAge(age); in createBean()
27 bean.setName(name); in createBean()
30 return bean; in createBean()
38 public Wrapper(JavaBeanWithStaticState bean) { in Wrapper() argument
40 name = bean.getName(); in Wrapper()
41 age = bean.getAge(); in Wrapper()
DStaticFieldsTest.java39 JavaBeanWithStaticState bean = new JavaBeanWithStaticState(); in testAsJavaBean() local
40 bean.setName("Bahrack"); in testAsJavaBean()
41 bean.setAge(-47); in testAsJavaBean()
45 String output = yaml.dump(bean); in testAsJavaBean()
56 JavaBeanWithStaticState bean = new JavaBeanWithStaticState(); in testCustomDump() local
57 bean.setName("Lui"); in testCustomDump()
58 bean.setAge(25); in testCustomDump()
62 String output = yaml.dump(bean); in testCustomDump()
112 JavaBeanWithStaticState bean = (JavaBeanWithStaticState) super in constructObject() local
115 return bean; in constructObject()
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/constructor/
DBigDecimalBeanConstructorTest.java27 BigDecimalJavaBean bean = new BigDecimalJavaBean(); in testRepresentor() local
28 bean.setAmount(1.5f); in testRepresentor()
29 bean.setNumber(new BigDecimal("3.1416")); in testRepresentor()
31 String output = yaml.dump(bean); in testRepresentor()
41 BigDecimalJavaBean bean = (BigDecimalJavaBean) yaml.load(className); in testConstructor() local
42 assertNotNull(bean); in testConstructor()
43 assertTrue(1.5 - bean.getAmount() < 0.0000001); in testConstructor()
44 … assertTrue((new BigDecimal("3.1416")).add(bean.getNumber().negate()).doubleValue() < 0.0000001); in testConstructor()
DIncompleteBeanConstructorTest.java27 IncompleteJavaBean bean = new IncompleteJavaBean(); in testRepresentor() local
31 String output = yaml.dump(bean); in testRepresentor()
40 IncompleteJavaBean bean = (IncompleteJavaBean) yaml.load(className); in testConstructor() local
41 assertNotNull(bean); in testConstructor()
42 assertEquals("No name", bean.getName()); in testConstructor()
43 assertEquals(2, bean.obtainNumber()); in testConstructor()
DCustomClassLoaderConstructorTest.java48 LoaderBean bean = (LoaderBean) yaml.load("{name: Andrey, number: 555}"); in testGetClassForNameWithRoot() local
49 assertEquals("Andrey", bean.getName()); in testGetClassForNameWithRoot()
50 assertEquals(555, bean.getNumber()); in testGetClassForNameWithRoot()
57 LoaderBean bean = (LoaderBean) yaml in testGetClassForNameBean() local
59 assertEquals("Andrey", bean.getName()); in testGetClassForNameBean()
60 assertEquals(555, bean.getNumber()); in testGetClassForNameBean()
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/issues/issue48/
DSkipJavaBeanPropertyTest.java28 Bean bean = new Bean(); in testWithNull() local
29 bean.setValue(3); in testWithNull()
31 String output = yaml.dumpAsMap(bean); in testWithNull()
37 Bean bean = new Bean(); in testWithoutNull() local
38 bean.setValue(5); in testWithoutNull()
40 String output = yaml.dumpAsMap(bean); in testWithoutNull()
47 protected NodeTuple representJavaBeanProperty(Object bean, Property property, Object value, in representJavaBeanProperty() argument
50 return super.representJavaBeanProperty(bean, property, value, customTag); in representJavaBeanProperty()
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/issues/issue115/
DParameterizedJavaBeanTest.java25 ParameterizedBean<Integer, String> bean = new ParameterizedBean<Integer, String>(); in testAsStandalone() local
26 bean.setK(13); in testAsStandalone()
27 bean.setV("ID47"); in testAsStandalone()
29 String result = yaml.dump(bean); in testAsStandalone()
43 ParameterizedBean<Integer, String> bean = new ParameterizedBean<Integer, String>(); in testAsJavaBeanProperty() local
44 bean.setK(432); in testAsJavaBeanProperty()
45 bean.setV("Val432"); in testAsJavaBeanProperty()
46 issue.setBean(bean); in testAsJavaBeanProperty()
DIssueBean.java19 private ParameterizedBean<Integer, String> bean = new ParameterizedBean<Integer, String>(); field in IssueBean
22 return bean; in getBean()
25 public void setBean(ParameterizedBean<Integer, String> bean) { in setBean() argument
26 this.bean = bean; in setBean()
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/emitter/template/
DVelocityTest.java45 MyBean bean = createBean(); in testTemplate1() local
46 context.put("bean", bean); in testTemplate1()
48 context.put("list", yaml.dump(bean.getList())); in testTemplate1()
63 assertEquals(bean, parsedBean); in testTemplate1()
67 MyBean bean = new MyBean(); in createBean() local
68 bean.setId("id123"); in createBean()
73 bean.setList(list); in createBean()
75 bean.setPoint(p); in createBean()
76 return bean; in createBean()
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/issues/issue47/
DReadOnlyPropertiesTest.java26 IncompleteBean bean = new IncompleteBean(); in testBean1() local
27 bean.setName("lunch"); in testBean1()
29 String output = yaml.dumpAsMap(bean); in testBean1()
35 assertEquals(bean.getName(), parsed.getName()); in testBean1()
39 IncompleteBean bean = new IncompleteBean(); in testBean2() local
40 bean.setName("lunch"); in testBean2()
44 String output = yaml.dumpAsMap(bean); in testBean2()
/external/mockito/src/test/java/org/mockito/internal/util/reflection/
DBeanPropertySetterTest.java70 SomeBeanWithNoSetterMatchingFieldType bean = new SomeBeanWithNoSetterMatchingFieldType(); in should_fail_if_matching_setter_cannot_be_found_and_if_report_failure_is_true() local
71 Field theField = bean.getClass().getDeclaredField("theField"); in should_fail_if_matching_setter_cannot_be_found_and_if_report_failure_is_true()
76 new BeanPropertySetter(bean, theField, true).set(valueToInject); in should_fail_if_matching_setter_cannot_be_found_and_if_report_failure_is_true()
87 SomeBeanWithJustAGetter bean = new SomeBeanWithJustAGetter(); in return_false_if_no_setter_was_found() local
88 Field theField = bean.getClass().getDeclaredField("theField"); in return_false_if_no_setter_was_found()
92 boolean injected = new BeanPropertySetter(bean, theField).set(valueToInject); in return_false_if_no_setter_was_found()
101 SomeBeanWithNoSetterMatchingFieldType bean = new SomeBeanWithNoSetterMatchingFieldType(); in return_false_if_no_setter_was_found_and_if_reportNoSetterFound_is_false() local
102 Field theField = bean.getClass().getDeclaredField("theField"); in return_false_if_no_setter_was_found_and_if_reportNoSetterFound_is_false()
106 boolean injected = new BeanPropertySetter(bean, theField, false).set(valueToInject); in return_false_if_no_setter_was_found_and_if_reportNoSetterFound_is_false()
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/
DEnumTest.java109 EnumBean bean = new EnumBean(); in testDumpEnumBean() local
110 bean.setId(17); in testDumpEnumBean()
111 bean.setSuit(Suit.SPADES); in testDumpEnumBean()
115 bean.setMap(map); in testDumpEnumBean()
116 String output = yaml.dump(bean); in testDumpEnumBean()
159 EnumBean bean = (EnumBean) yaml in testLoadEnumBean() local
166 assertEquals(Suit.CLUBS, bean.getSuit()); in testLoadEnumBean()
167 assertEquals(174, bean.getId()); in testLoadEnumBean()
168 assertEquals(map, bean.getMap()); in testLoadEnumBean()
177 EnumBean bean = (EnumBean) yaml in testLoadEnumBean2() local
[all …]
/external/snakeyaml/src/test/java/examples/jodatime/
DJodaTimeFlowStylesTest.java43 MyBean bean = new MyBean(); in testLoadBeanWithBlockFlow() local
44 bean.setId("id123"); in testLoadBeanWithBlockFlow()
46 bean.setDate(etalon); in testLoadBeanWithBlockFlow()
51 Node node1 = dumper.represent(bean); in testLoadBeanWithBlockFlow()
55 Node node2 = dumper2.represent(bean); in testLoadBeanWithBlockFlow()
73 String doc1 = dumper.dump(bean); in testLoadBeanWithBlockFlow()
118 MyBean bean = new MyBean(); in testLoadBeanWithAutoFlow() local
119 bean.setId("id123"); in testLoadBeanWithAutoFlow()
121 bean.setDate(etalon); in testLoadBeanWithAutoFlow()
125 String doc = dumper.dump(bean); in testLoadBeanWithAutoFlow()
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/issues/issue127/
DNullAliasTest.java33 Bean bean = new Bean(); in testRespresenter() local
35 bean.setA("a"); // leave b null in testRespresenter()
37 String output = yaml.dump(bean); in testRespresenter()
48 Bean bean = (Bean) data; in representData() local
50 fields.put("a", bean.getA()); in representData()
51 fields.put("b", bean.getB()); in representData()
/external/snakeyaml/src/main/java/org/yaml/snakeyaml/extensions/compactnotation/
DCompactConstructor.java72 protected void setProperties(Object bean, Map<String, Object> data) throws Exception { in setProperties() argument
78 Property property = getPropertyUtils().getProperty(bean.getClass(), key); in setProperties()
80 property.set(bean, entry.getValue()); in setProperties()
83 + data.get(key) + "' (" + data.get(key).getClass() + ") in " + bean); in setProperties()
202 protected void applySequence(Object bean, List<?> value) { in applySequence() argument
204 Property property = getPropertyUtils().getProperty(bean.getClass(), in applySequence()
205 getSequencePropertyName(bean.getClass())); in applySequence()
206 property.set(bean, value); in applySequence()
218 protected String getSequencePropertyName(Class<?> bean) throws IntrospectionException { in getSequencePropertyName() argument
219 Set<Property> properties = getPropertyUtils().getProperties(bean); in getSequencePropertyName()
[all …]
/external/apache-harmony/beans/src/test/support/java/org/apache/harmony/beans/tests/support/
DStandardBean.java31 private StandardBean bean = null; field in StandardBean
49 return bean; in getPeer()
52 public void setPeer(StandardBean bean) { in setPeer() argument
53 this.bean = bean; in setPeer()

12345