jdk-24/jdk/test/java/beans
Alan Bateman db4d383614 8142968: Module System implementation
Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282

Co-authored-by: Alex Buckley <alex.buckley@oracle.com>
Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Chris Hegarty <chris.hegarty@oracle.com>
Co-authored-by: Alexandr Scherbatiy <alexandr.scherbatiy@oracle.com>
Co-authored-by: Amy Lu <amy.lu@oracle.com>
Co-authored-by: Calvin Cheung <calvin.cheung@oracle.com>
Co-authored-by: Daniel Fuchs <daniel.fuchs@oracle.com>
Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com>
Co-authored-by: Harold Seigel <harold.seigel@oracle.com>
Co-authored-by: Jaroslav Bachorik <jaroslav.bachorik@oracle.com>
Co-authored-by: Jean-Francois Denise <jean-francois.denise@oracle.com>
Co-authored-by: Jan Lahoda <jan.lahoda@oracle.com>
Co-authored-by: James Laskey <james.laskey@oracle.com>
Co-authored-by: Lois Foltan <lois.foltan@oracle.com>
Co-authored-by: Miroslav Kos <miroslav.kos@oracle.com>
Co-authored-by: Huaming Li <huaming.li@oracle.com>
Co-authored-by: Sean Mullan <sean.mullan@oracle.com>
Co-authored-by: Naoto Sato <naoto.sato@oracle.com>
Co-authored-by: Masayoshi Okutsu <masayoshi.okutsu@oracle.com>
Co-authored-by: Peter Levart <peter.levart@gmail.com>
Co-authored-by: Philip Race <philip.race@oracle.com>
Co-authored-by: Claes Redestad <claes.redestad@oracle.com>
Co-authored-by: Sergey Bylokhov <sergey.bylokhov@oracle.com>
Co-authored-by: Alexandre Iline <alexandre.iline@oracle.com>
Co-authored-by: Volker Simonis <volker.simonis@gmail.com>
Co-authored-by: Staffan Larsen <staffan.larsen@oracle.com>
Co-authored-by: Stuart Marks <stuart.marks@oracle.com>
Co-authored-by: Semyon Sadetsky <semyon.sadetsky@oracle.com>
Co-authored-by: Serguei Spitsyn <serguei.spitsyn@oracle.com>
Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com>
Co-authored-by: Valerie Peng <valerie.peng@oracle.com>
Co-authored-by: Vincent Ryan <vincent.x.ryan@oracle.com>
Co-authored-by: Weijun Wang <weijun.wang@oracle.com>
Co-authored-by: Yuri Nesterenko <yuri.nesterenko@oracle.com>
Co-authored-by: Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
Co-authored-by: Alexander Kulyakthin <alexander.kulyakhtin@oracle.com>
Co-authored-by: Felix Yang <felix.yang@oracle.com>
Co-authored-by: Andrei Eremeev <andrei.eremeev@oracle.com>
Co-authored-by: Frank Yuan <frank.yuan@oracle.com>
Co-authored-by: Sergei Pikalev <sergei.pikalev@oracle.com>
Co-authored-by: Sibabrata Sahoo <sibabrata.sahoo@oracle.com>
Co-authored-by: Tiantian Du <tiantian.du@oracle.com>
Co-authored-by: Sha Jiang <sha.jiang@oracle.com>
Reviewed-by: alanb, mchung, naoto, rriggs, psandoz, plevart, mullan, ascarpino, vinnie, prr, sherman, dfuchs, mhaupt
2016-03-17 19:04:16 +00:00
..
beancontext 6943119: Rebrand source copyright notices 2010-05-25 15:58:33 -07:00
Beans 8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013 2013-12-26 12:04:16 -08:00
EventHandler 8145589: Test6277246.java fails to compile after JDK-8144479 2015-12-18 16:12:55 +00:00
Introspector 8145589: Test6277246.java fails to compile after JDK-8144479 2015-12-18 16:12:55 +00:00
Performance 8066404: The case is failed automatically and thrown the "java.lang.IllegalStateException" exception 2015-07-18 15:10:44 +03:00
PropertyChangeSupport 7148143: PropertyChangeSupport.addPropertyChangeListener can throw ClassCastException 2012-03-05 18:01:13 +04:00
PropertyEditor 8081547: Prepare client libs regression tests for running in a concurrent, headless jtreg environment 2015-06-30 17:48:06 -07:00
SimpleBeanInfo/LoadingStandardIcons 8134984: Text files should end in exactly one newline 2015-09-02 14:11:50 -07:00
Statement 8145589: Test6277246.java fails to compile after JDK-8144479 2015-12-18 16:12:55 +00:00
VetoableChangeSupport 7148143: PropertyChangeSupport.addPropertyChangeListener can throw ClassCastException 2012-03-05 18:01:13 +04:00
XMLDecoder 8137113: [TEST_BUG] Two java.beans tests need to be updated to work with JDK 9 modularized filesystem 2015-11-10 13:46:45 +03:00
XMLEncoder 8142968: Module System implementation 2016-03-17 19:04:16 +00:00
README 8134984: Text files should end in exactly one newline 2015-09-02 14:11:50 -07:00
TEST.properties 8076468: Add @modules to tests in jdk_desktop test group 2015-06-23 11:59:27 +03:00

How to create regression tests for JavaBeans
============================================

All regression tests are developed to run under JavaTest 3.2.2.



TEST HIERARCHY
--------------

You should choose an appropriate folder from the following list:
 - The Beans folder contains tests for the java.beans.Beans class
 - The EventHandler folder contains tests for the java.beans.EventHandler class
 - The Introspector folder contains tests for introspection
 - The PropertyChangeSupport folder contains tests for the bound properties
 - The VetoableChangeSupport folder contains tests for the constrained properties
 - The PropertyEditor folder contains tests for all property editors
 - The Statement folder contains tests for statements and expressions
 - The XMLDecoder folder contains tests for XMLDecoder
 - The XMLEncoder folder contains tests for XMLEncoder
 - The Performance folder contains manual tests for performance
 - The beancontext folder contains tests for classes
   from the java.beans.beancontext package



NAME CONVENTIONS FOR TEST CLASSES
---------------------------------

Usually a class name should start with the "Test" word
followed by 7-digit CR number. For example:
	Beans/Test4067824.java

If your test contains additional files you should create
a subfolder with the CR number as its name. For example:
	Introspector/4168475/Test4168475.java
	Introspector/4168475/infos/ComponentBeanInfo.java

If you have several tests for the same CR number you should also
create a subfolder with the CR number as its name. For example:
	XMLEncoder/4741757/AbstractTest.java
	XMLEncoder/4741757/TestFieldAccess.java
	XMLEncoder/4741757/TestSecurityManager.java
	XMLEncoder/4741757/TestStackOverflow.java

Every JAR file should contain source files for all class files. For example:
	XMLDecoder/4676532/test.jar#test/Test.class
	XMLDecoder/4676532/test.jar#test/Test.java



USEFUL UTILITY CLASSES
----------------------

For Introspector tests you can use the BeanUtils class.
This class provides helpful methods to get
property descriptors for the specified type.


For XMLEncoder tests you can use the AbstractTest class.
This class is intended to simplify tests creating.
It contains methods to encode an object to XML,
decode XML and validate the result.
The validate() method is applied to compare
the object before encoding with the object after decoding.
If the test fails the Error is thrown.
1) The getObject() method should be implemented
   to return the object to test.
   This object will be encoded and decoded
   and the object creation will be tested.
2) The getAnotherObject() method can be overridden
   to return a different object to test.
   If this object is not null it will be encoded and decoded.
   Also the object updating will be tested in this case.
The test() method has a boolean parameter,
which indicates that the test should be started in secure context.