diff --git a/tests/build.xml b/tests/build.xml index 658b826f9..c9e40ee9e 100644 --- a/tests/build.xml +++ b/tests/build.xml @@ -25,8 +25,16 @@ + + + + + + + + - + diff --git a/tests/src/java/com/threerings/presents/server/TestObject.dobj b/tests/src/java/com/threerings/presents/server/TestObject.dobj index 081896115..01030c02a 100644 --- a/tests/src/java/com/threerings/presents/server/TestObject.dobj +++ b/tests/src/java/com/threerings/presents/server/TestObject.dobj @@ -1,49 +1,16 @@ // -// $Id: TestObject.dobj,v 1.6 2002/02/05 20:27:59 mdb Exp $ +// $Id: TestObject.dobj,v 1.7 2002/02/08 23:17:38 mdb Exp $ package com.threerings.presents.server; import com.threerings.presents.dobj.*; /** - * I use this to test until I get the actual DObject generation script - * working. + * A test distributed object. */ public class TestObject extends DObject { - public static final String FOO = "foo"; - public static final String BAR = "bar"; - public static final String LIST = "list"; - public int foo; public String bar; public OidList list = new OidList(); - - public void setFoo (int foo) - { - requestAttributeChange(FOO, new Integer(foo)); - } - - public void setBar (String bar) - { - requestAttributeChange(BAR, bar); - } - - /** - * Requests that the specified oid be added to the - * list oid list. - */ - public void addToList (int oid) - { - requestOidAdd(LIST, oid); - } - - /** - * Requests that the specified oid be removed from the - * list oid list. - */ - public void removeFromList (int oid) - { - requestOidRemove(LIST, oid); - } } diff --git a/tests/src/java/com/threerings/presents/server/TestObject.java b/tests/src/java/com/threerings/presents/server/TestObject.java new file mode 100644 index 000000000..a6254f3d1 --- /dev/null +++ b/tests/src/java/com/threerings/presents/server/TestObject.java @@ -0,0 +1,85 @@ +// +// $Id: TestObject.java,v 1.1 2002/02/08 23:17:38 mdb Exp $ + +package com.threerings.presents.server; + +import com.threerings.presents.dobj.*; + +/** + * A test distributed object. + */ +public class TestObject extends DObject +{ + /** The field name of the foo field. */ + public static final String FOO = "foo"; + + /** The field name of the bar field. */ + public static final String BAR = "bar"; + + /** The field name of the list field. */ + public static final String LIST = "list"; + + public int foo; + public String bar; + public OidList list = new OidList(); + + /** + * Requests that the foo field be set to the specified + * value. + */ + public void setFoo (int foo) + { + requestAttributeChange(FOO, new Integer(foo)); + } + + /** + * Requests that the foo field be set to the + * specified value and immediately updates the state of the object + * to reflect the change. This should only be called on the + * server and only then if you know what you're doing. + */ + public void setFooImmediate (int foo) + { + this.foo = foo; + requestAttributeChange(FOO, new Integer(foo)); + } + + /** + * Requests that the bar field be set to the specified + * value. + */ + public void setBar (String bar) + { + requestAttributeChange(BAR, bar); + } + + /** + * Requests that the bar field be set to the + * specified value and immediately updates the state of the object + * to reflect the change. This should only be called on the + * server and only then if you know what you're doing. + */ + public void setBarImmediate (String bar) + { + this.bar = bar; + requestAttributeChange(BAR, bar); + } + + /** + * Requests that the specified oid be added to the + * list oid list. + */ + public void addToList (int oid) + { + requestOidAdd(LIST, oid); + } + + /** + * Requests that the specified oid be removed from the + * list oid list. + */ + public void removeFromList (int oid) + { + requestOidRemove(LIST, oid); + } +}