|
From: <tre...@us...> - 2007-10-02 02:28:31
|
Revision: 466
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=466&view=rev
Author: trevorolio
Date: 2007-10-01 19:28:36 -0700 (Mon, 01 Oct 2007)
Log Message:
-----------
THIS CHECKIN REQUIRES A DB DROP
Introducing a new world of user configurable body settings. Ditched the old BodyRecord and created three new record types:
BodyDataRecords: hold information about the wadges of data which make up a body's base (e.g. mesh, morphs, textures...)
BodyConfigurationRecords: a user level representation of a body configuration, with a display name and a set of...
BodySettingRecords: morph interpolation values for a given body configuration (e.g. height, 0.9 or chin width, 0.2)
Halfway through documentifying and RESTifying these records. I can smell the day when this is autogenerated from annotated classes.
Modified Paths:
--------------
maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/WebAPITest.java
Modified: maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
===================================================================
--- maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java 2007-10-02 02:28:33 UTC (rev 465)
+++ maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java 2007-10-02 02:28:36 UTC (rev 466)
@@ -55,7 +55,7 @@
import com.ogoglio.util.WebConstants;
import com.ogoglio.xml.AccountDocument;
import com.ogoglio.xml.AuthDocument;
-import com.ogoglio.xml.BodyDocument;
+import com.ogoglio.xml.BodyDataDocument;
import com.ogoglio.xml.DoorDocument;
import com.ogoglio.xml.PageDocument;
import com.ogoglio.xml.PossessionDocument;
@@ -226,6 +226,15 @@
assertNull(ac2.getFrozenUntil());
assertEquals(AccountDocument.ACCOUNT_LEVEL_BASIC, accountDoc.getAccountLevel());
+
+ BodyDataDocument bodyDataDoc = adminWebClient.createBodyData("Super Puppy", "ogoglio-body-superpuppy.jar");
+ assertNotNull(bodyDataDoc);
+ assertFalse(bodyDataDoc.getBodyDataID() == -1);
+ bodyDataDoc = adminWebClient.getBodyDataDocument(bodyDataDoc.getBodyDataID());
+ assertNotNull(bodyDataDoc);
+ assertEquals("Super Puppy", bodyDataDoc.getDisplayName());
+ adminWebClient.deleteBodyData(bodyDataDoc.getBodyDataID());
+
}
public void testWebAPIClient() throws IOException {
@@ -255,8 +264,6 @@
checkSettings(spaceDocument.getSpaceID(), advancedClient);
- checkBody(advancedClient, advancedAuth);
-
TemplateDocument newTemplateDoc = checkTemplateScriptAPI(advancedClient);
ThingDocument[] thingDocs = checkTemplateGeomMaterialsAndPossessions(advancedClient, newTemplateDoc, spaceDocument);
@@ -514,32 +521,6 @@
}
- private void checkBody(WebAPIClient webClient1, WebAPIAuthenticator authenticator) throws IOException {
- AccountDocument ownerDoc = authenticator.getAccountDocument(true);
- assertNotNull(ownerDoc);
- assertEquals(USERNAME1, ownerDoc.getUsername());
- long defaultBody = ownerDoc.getDefaultBodyID();
- BodyDocument bodyDoc = webClient1.createBody("Testing Body");
- assertFalse(bodyDoc.getBodyID() == -1);
- assertEquals(ownerDoc.getUsername(), bodyDoc.getOwnerUsername());
- assertEquals(0, bodyDoc.getHairIndex());
- assertEquals(0, bodyDoc.getEyesIndex());
- assertEquals(0, bodyDoc.getNoseIndex());
- assertEquals(0, bodyDoc.getMouthIndex());
- assertEquals(0, bodyDoc.getFaceIndex());
- ownerDoc = webClient1.setDefaultBody(bodyDoc.getBodyID());
- assertEquals(bodyDoc.getBodyID(), ownerDoc.getDefaultBodyID());
- assertEquals(ownerDoc.getUsername(), bodyDoc.getOwnerUsername());
- bodyDoc.setEyesIndex(3);
- bodyDoc = webClient1.updateBody(bodyDoc);
- assertEquals(3, bodyDoc.getEyesIndex());
- assertFalse(webClient1.deleteBody(bodyDoc.getBodyID()));
- webClient1.setDefaultBody(defaultBody);
- assertTrue(webClient1.deleteBody(bodyDoc.getBodyID()));
- ownerDoc = webClient1.setDefaultBody(bodyDoc.getBodyID());
- assertEquals(defaultBody, ownerDoc.getDefaultBodyID());
- }
-
private SpaceDocument checkSpaceSeaLevel(WebAPIClient webClient1, SpaceDocument spaceDocument) throws IOException {
assertFalse(spaceDocument.getDisplaySea());
Modified: maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/WebAPITest.java
===================================================================
--- maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/WebAPITest.java 2007-10-02 02:28:33 UTC (rev 465)
+++ maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/WebAPITest.java 2007-10-02 02:28:36 UTC (rev 466)
@@ -47,7 +47,7 @@
notAuthedAuthDoc = new AuthDocument("Ian", false);
authedAuthDoc = new AuthDocument("Ian", true);
- accountDoc = new AccountDocument(authedAuthDoc.getUsername(), AccountDocument.ACCOUNT_LEVEL_ADVANCED, null, null, null, null, null, AccountDocument.NO_TIME_VALUE, null, AccountDocument.NO_TIME_VALUE, -1);
+ accountDoc = new AccountDocument(authedAuthDoc.getUsername(), AccountDocument.ACCOUNT_LEVEL_ADVANCED, null, null, null, null, null, AccountDocument.NO_TIME_VALUE, null, AccountDocument.NO_TIME_VALUE);
} catch (URISyntaxException e) {
fail("Bad URIL: " + e);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|