TEST testCase0001 - XmlAccessorType

DESCRIPTION

Jakarta XML Binding specification assertion: JAXB:SPEC:J2S:1044
Mapping: @XmlAccessorType annotation allows control over default serialization of fields and properties.
XmlAccessorType(AccessType.PUBLIC_MEMBER) By Default

The annotation XmlAccessorType on a package applies to all classes in the package.
The following inheritance semantics apply:
If there is a XmlAccessorType on a class, then it is used.
Otherwise, if a XmlAccessorType exists on one of its super classes, then it is inherited.
Otherwise, the XmlAccessorType on a package is inherited.
Note: Positive test. Xml consists of all required fileds without extra fields or properties.

FILES

ItemValue
title testCase0001 - XmlAccessorType
name testCase0001
source srcInherit1.java srcInherit1/package-info.java posField1.xml
executeClass javasoft.sqe.tests.api.jakarta.xml.bind.SchemaGenTest
keywords runtime positive java_to_schema jaxb
executeArgs -j srcInherit1.java:srcInherit1/package-info.java -d posField1.xml -TestURL $testURL
selectIf toTestOptionalSchemagen


TEST testCase0002 - XmlAccessorType

DESCRIPTION

Jakarta XML Binding specification assertion: JAXB:SPEC:J2S:1044
Mapping: @XmlAccessorType annotation allows control over default serialization of fields and properties.
XmlAccessorType(AccessType.PUBLIC_MEMBER) By Default

The annotation XmlAccessorType on a package applies to all classes in the package.
The following inheritance semantics apply:
If there is a XmlAccessorType on a class, then it is used.
Otherwise, if a XmlAccessorType exists on one of its super classes, then it is inherited.
Otherwise, the XmlAccessorType on a package is inherited.
Note: Negative test. Required field is absent in xml file.

FILES

ItemValue
title testCase0002 - XmlAccessorType
name testCase0002
source srcInherit1.java srcInherit1/package-info.java negField1.xml
executeClass javasoft.sqe.tests.api.jakarta.xml.bind.SchemaGenTest
keywords runtime positive java_to_schema jaxb
executeArgs -j srcInherit1.java:srcInherit1/package-info.java -n -d negField1.xml -TestURL $testURL
selectIf toTestOptionalSchemagen


TEST testCase0003 - XmlAccessorType

DESCRIPTION

Jakarta XML Binding specification assertion: JAXB:SPEC:J2S:1044
Mapping: @XmlAccessorType annotation allows control over default serialization of fields and properties.
XmlAccessorType(AccessType.PUBLIC_MEMBER) By Default

The annotation XmlAccessorType on a package applies to all classes in the package.
The following inheritance semantics apply:
If there is a XmlAccessorType on a class, then it is used.
Otherwise, if a XmlAccessorType exists on one of its super classes, then it is inherited.
Otherwise, the XmlAccessorType on a package is inherited.
Note: Negative test. Xml file contains extraneous property.

FILES

ItemValue
title testCase0003 - XmlAccessorType
name testCase0003
source srcInherit1.java srcInherit1/package-info.java negField2.xml
executeClass javasoft.sqe.tests.api.jakarta.xml.bind.SchemaGenTest
keywords runtime positive java_to_schema jaxb
executeArgs -j srcInherit1.java:srcInherit1/package-info.java -n -d negField2.xml -TestURL $testURL
selectIf toTestOptionalSchemagen


TEST testCase0004 - XmlAccessorType

DESCRIPTION

Jakarta XML Binding specification assertion: JAXB:SPEC:J2S:1044
Mapping: @XmlAccessorType annotation allows control over default serialization of fields and properties.
XmlAccessorType(AccessType.PUBLIC_MEMBER) By Default

The annotation XmlAccessorType on a package applies to all classes in the package.
The following inheritance semantics apply:
If there is a XmlAccessorType on a class, then it is used.
Otherwise, if a XmlAccessorType exists on one of its super classes, then it is inherited.
Otherwise, the XmlAccessorType on a package is inherited.
Note: Negative test. Xml file contains extraneous field (transient field in java file)

FILES

ItemValue
title testCase0004 - XmlAccessorType
name testCase0004
source srcInherit1.java srcInherit1/package-info.java negField3.xml
executeClass javasoft.sqe.tests.api.jakarta.xml.bind.SchemaGenTest
keywords runtime positive java_to_schema jaxb
executeArgs -j srcInherit1.java:srcInherit1/package-info.java -n -d negField3.xml -TestURL $testURL
selectIf toTestOptionalSchemagen


%Copyright% © 2017, 2020 Oracle and/or its affiliates. All rights reserved.