1
0
Fork 0
mirror of https://github.com/ethauvin/JSON-java.git synced 2025-06-17 16:00:51 -07:00

Adds new tests for testing bean->JSONObject mapping

This commit is contained in:
John J. Aylward 2017-07-09 17:35:46 -04:00
parent 0e3f23d7a1
commit 49117f33dc
6 changed files with 356 additions and 0 deletions

View file

@ -0,0 +1,49 @@
package org.json.junit.data;
/**
* Sample singleton done as an Enum for use with bean testing.
*
* @author John Aylward
*
*/
public enum SingletonEnum {
INSTANCE;
/** */
private int someInt;
/** */
private String someString;
/** single instance. */
/**
* @return the singleton instance. I a real application, I'd hope no one did
* this to an enum singleton.
*/
public static final SingletonEnum getInstance() {
return INSTANCE;
}
/** */
private SingletonEnum() {
}
/** @return someInt */
public int getSomeInt() {
return someInt;
}
/** sets someInt */
public void setSomeInt(int someInt) {
this.someInt = someInt;
}
/** @return someString */
public String getSomeString() {
return someString;
}
/** sets someString */
public void setSomeString(String someString) {
this.someString = someString;
}
}