Author: julien(a)jboss.com
Date: 2007-12-03 20:02:12 -0500 (Mon, 03 Dec 2007)
New Revision: 9263
Added:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModelTestCase.java
Removed:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModel.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockObject.java
Modified:
branches/presentation/presentation/build.xml
Log:
moved MockModelTestCase in the model package so it can not use package protected method
from the model.state.structural package
Modified: branches/presentation/presentation/build.xml
===================================================================
--- branches/presentation/presentation/build.xml 2007-12-04 00:58:53 UTC (rev 9262)
+++ branches/presentation/presentation/build.xml 2007-12-04 01:02:12 UTC (rev 9263)
@@ -313,7 +313,7 @@
</x-sysproperty>
<x-test>
<test todir="${test.reports}"
name="org.jboss.portal.presentation.test.model.ModelTestCase"/>
- <test todir="${test.reports}"
name="org.jboss.portal.presentation.test.model.state.structural.MockModelTestCase"/>
+ <test todir="${test.reports}"
name="org.jboss.portal.presentation.test.model.MockModelTestCase"/>
</x-test>
<x-classpath>
<path refid="jboss.portal/modules/common.classpath"/>
Deleted:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModel.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModel.java 2007-12-04
00:58:53 UTC (rev 9262)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModel.java 2007-12-04
01:02:12 UTC (rev 9263)
@@ -1,356 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.test.model;
-
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.state.NoSuchStateException;
-import org.jboss.portal.presentation.model.state.StateChangeVetoException;
-import org.jboss.portal.presentation.model.state.StateException;
-import
org.jboss.portal.presentation.model.state.structural.AbstractStructuralStateContext;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
-import org.jboss.portal.presentation.model.state.structural.StructuralState;
-import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class MockModel
-{
-
- /** . */
- private int generator = 0;
-
- /** . */
- private final Map<String, MockObjectImpl> universe = new HashMap<String,
MockObjectImpl>();
-
- /** . */
- private final MockObjectImpl root = new MockObjectImpl();
-
- private final StructuralStateContext structuralStateContext = new
AbstractStructuralStateContext()
- {
- public StructuralObject load(String objectId) throws IllegalArgumentException
- {
- if (objectId == null)
- {
- throw new IllegalArgumentException();
- }
- MockObjectImpl object = universe.get(objectId);
- return object != null ? object.takeSnapshot() : null;
- }
-
- public String getRootId()
- {
- return root.id;
- }
-
- public void update(StructuralObject structuralObject, Map<String, String>
changes) throws StateChangeVetoException
- {
- MockObjectImpl object =
universe.get(((MockStructuralObject)structuralObject).getId());
- if (object == null)
- {
- throw new NoSuchStateException();
- }
-
- //
- for (Map.Entry<String, String> entry : changes.entrySet())
- {
- String propertyName = entry.getKey();
- MockObject.UpdateBehavior behavior =
object.propertyBehaviors.get(propertyName);
- if (behavior instanceof MockObject.Veto)
- {
- throw new StateChangeVetoException("Cannot modify non behavior
property");
- }
- else if (behavior instanceof MockObject.Failure)
- {
- MockObject.Failure failure = (MockObject.Failure)behavior;
- failure.throwAs(IllegalArgumentException.class).
- throwAs(StateChangeVetoException.class).
- throwAs(StateException.class);
- }
- else
- {
- String propertyValue = entry.getValue();
- if (propertyValue != null)
- {
- object.propertyValues.put(propertyName, propertyValue);
- }
- else
- {
- object.propertyValues.remove(propertyName);
- }
- }
- }
- }
-
- public List<StructuralObject> loadChildren(StructuralObject object)
- {
- MockStructuralObject mockStructuralObject = (MockStructuralObject)object;
- MockObjectImpl mockObject = universe.get(mockStructuralObject.id);
- List<StructuralObject> tmp = new ArrayList<StructuralObject>();
- for (MockObjectImpl mockChild : mockObject.children.values())
- {
- tmp.add(mockChild.takeSnapshot());
- }
- return tmp;
- }
-
- public StructuralObject loadParent(StructuralObject object)
- {
- MockStructuralObject mockStructuralObject = (MockStructuralObject)object;
- MockObjectImpl mockObject = universe.get(mockStructuralObject.id);
- return mockObject.parent.takeSnapshot();
- }
- };
-
- public StructuralStateContext getStructuralStateContext()
- {
- return structuralStateContext;
- }
-
- public MockObject getRoot()
- {
- return root;
- }
-
- public void destroy(String objectId)
- {
- MockObjectImpl object = universe.remove(objectId);
- if (object.parent != null)
- {
- object.parent.children.remove(object.id);
- }
-
- //
- for (String childId : new ArrayList<String>(object.children.keySet()))
- {
- destroy(childId);
- }
- }
-
- private class MockObjectImpl implements MockObject
- {
-
- /** . */
- private final MockObject.Type type;
-
- /** . */
- private final String name;
-
- /** . */
- private final String id = "" + generator++;
-
- /** . */
- private final Map<String, String> propertyValues;
-
- /** . */
- private final Map<String, UpdateBehavior> propertyBehaviors;
-
- /** . */
- private final Map<String, MockObjectImpl> children;
-
- /** . */
- private MockObjectImpl parent;
-
- private MockObjectImpl()
- {
- this.parent = null;
- this.name = "";
- this.type = MockObject.Type.CONTEXT;
- this.children = new LinkedHashMap<String, MockObjectImpl>();
- this.propertyValues = new HashMap<String, String>();
- this.propertyBehaviors = new HashMap<String, UpdateBehavior>();
-
- //
- universe.put(id, this);
- }
-
- private MockObjectImpl(MockObjectImpl parent, String name, MockObject.Type type)
- {
- if (parent.children.containsKey(name))
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.name = name;
- this.type = type;
- this.children = new LinkedHashMap<String, MockObjectImpl>();
- this.propertyValues = new HashMap<String, String>();
- this.propertyBehaviors = new HashMap<String, UpdateBehavior>();
-
- //
- this.parent = parent;
- parent.children.put(id, this);
-
- //
- universe.put(id, this);
- }
-
- public MockObject.Type getType()
- {
- return type;
- }
-
- public String getName()
- {
- return name;
- }
-
- public String getId()
- {
- return id;
- }
-
- public StructuralObject takeSnapshot()
- {
- return new MockStructuralObject(id, new MockStructuralState(type.clazz, name,
new HashMap<String, String>(propertyValues)));
- }
-
- public String getPropertyValue(String propertyName)
- {
- return propertyValues.get(propertyName);
- }
-
- public MockObject addChild(String name, MockObject.Type type)
- {
- if (name == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- return new MockObjectImpl(this, name, type);
- }
-
- public Set<String> getPropertyNames()
- {
- return propertyValues.keySet();
- }
-
- public void setPropertyBehavior(String propertyName, UpdateBehavior
propertyBehavior)
- {
- if (propertyName == null)
- {
- throw new IllegalArgumentException();
- }
- if (propertyBehavior != null)
- {
- propertyBehaviors.put(name, propertyBehavior);
- }
- else
- {
- propertyBehaviors.remove(name);
- }
- }
-
- public UpdateBehavior getPropertyBehavior(String propertyName)
- {
- return propertyBehaviors.get(propertyName);
- }
-
- public void setPropertyValue(String propertyName, String propertyValue)
- {
- if (propertyName == null)
- {
- throw new IllegalArgumentException();
- }
- if (propertyValue != null)
- {
- propertyValues.put(propertyName, propertyValue);
- }
- else
- {
- propertyValues.remove(propertyName);
- }
- }
- }
-
- public class MockStructuralState implements StructuralState
- {
-
- /** . */
- private final Class<? extends UIObject> type;
-
- /** . */
- private final String name;
-
- /** . */
- private final Map<String, String> properties;
-
- public MockStructuralState(Class<? extends UIObject> type, String name,
Map<String, String> properties)
- {
- this.type = type;
- this.name = name;
- this.properties = properties;
- }
-
- public Class<? extends UIObject> getType()
- {
- return type;
- }
-
- public String getName()
- {
- return name;
- }
-
- public Map<String, String> getProperties()
- {
- return properties;
- }
- }
-
- public class MockStructuralObject implements StructuralObject
- {
-
- /** . */
- private final String id;
-
- /** . */
- private final MockStructuralState state;
-
- public MockStructuralObject(String id, MockStructuralState state)
- {
- this.id = id;
- this.state = state;
- }
-
- public String getId()
- {
- return id;
- }
-
- public StructuralState getState()
- {
- return state;
- }
- }
-}
Copied:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModelTestCase.java
(from rev 9262,
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/state/structural/MockModelTestCase.java)
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModelTestCase.java
(rev 0)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModelTestCase.java 2007-12-04
01:02:12 UTC (rev 9263)
@@ -0,0 +1,280 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.test.model;
+
+import junit.framework.TestCase;
+import org.jboss.portal.presentation.model.UIContext;
+import org.jboss.portal.presentation.model.UIPortal;
+import org.jboss.portal.presentation.model.state.StaleStateException;
+import
org.jboss.portal.presentation.model.state.structural.AbstractStructuralStateChangeListener;
+import org.jboss.portal.presentation.model.state.structural.StructuralObject;
+import org.jboss.portal.presentation.model.state.structural.StructuralState;
+import
org.jboss.portal.presentation.model.state.structural.StructuralStateChangeListener;
+import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
+import org.jboss.portal.presentation.test.model.state.structural.MockModel;
+import org.jboss.portal.presentation.test.model.state.structural.MockObject;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Test that the mock model we are using behaves in an expected manner
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class MockModelTestCase extends TestCase
+{
+
+ /** . */
+ private MockModel model;
+
+ /** . */
+ private StructuralStateContext ssc;
+
+ /** . */
+ private Map<String, StructuralObject> universe;
+
+ /** . */
+ private final StructuralStateChangeListener listener = new
AbstractStructuralStateChangeListener()
+ {
+ public void update(StructuralObject object)
+ {
+ universe.put(object.getId(), object);
+ }
+ };
+
+ protected void setUp() throws Exception
+ {
+ model = new MockModel();
+ ssc = model.getStructuralStateContext();
+ universe = new HashMap<String, StructuralObject>();
+ }
+
+ protected void tearDown() throws Exception
+ {
+ model = null;
+ ssc = null;
+ universe = null;
+ }
+
+ public void testRoot()
+ {
+ MockObject mockRoot = model.getRoot();
+ assertNotNull(mockRoot);
+ assertEquals(Collections.EMPTY_SET, mockRoot.getPropertyNames());
+ assertNull(mockRoot.getParent());
+ assertEquals(Collections.EMPTY_LIST, mockRoot.getChildren());
+ assertEquals(MockObject.Type.CONTEXT, mockRoot.getType());
+ assertEquals("", mockRoot.getName());
+ assertEquals(true, mockRoot.isValid());
+
+ //
+ String rootId = ssc.getRootId();
+ assertNotNull(rootId);
+ StructuralObject root = ssc.load(rootId);
+ assertNotNull(root);
+ assertEquals(rootId, root.getId());
+ StructuralState state = root.getState();
+ assertEquals(UIContext.class, state.getType());
+ assertEquals("", state.getName());
+ assertEquals(Collections.EMPTY_MAP, state.getProperties());
+ }
+
+ public void testSetProperty()
+ {
+ MockObject mockRoot = model.getRoot();
+ String rootId = mockRoot.getId();
+ int rootV0 = mockRoot.getVersion();
+
+ //
+ StructuralObject root0 = ssc.load(rootId);
+ StructuralState rootState0 = root0.getState();
+ assertEquals(Collections.EMPTY_MAP, rootState0.getProperties());
+
+ // Set
+ ssc.update(listener, root0, Collections.singletonMap("foo",
"bar"));
+
+ //
+ int rootV1 = mockRoot.getVersion();
+ assertTrue(rootV1 > rootV0);
+ assertEquals(Collections.singleton("foo"), mockRoot.getPropertyNames());
+ assertEquals("bar", mockRoot.getPropertyValue("foo"));
+ assertEquals(Collections.EMPTY_MAP, rootState0.getProperties());
+ assertStale(root0);
+ StructuralObject root1_0 = universe.get(rootId);
+ assertNotNull(root1_0);
+ assertNotStale(root1_0);
+ StructuralState rootState1_0 = root1_0.getState();
+ assertEquals(Collections.singletonMap("foo", "bar"),
rootState1_0.getProperties());
+ StructuralObject root1_1 = ssc.load(rootId);
+ assertNotNull(root1_1);
+ assertNotStale(root1_1);
+ StructuralState rootState1_1 = root1_1.getState();
+ assertEquals(Collections.singletonMap("foo", "bar"),
rootState1_1.getProperties());
+ }
+
+ public void testUpdateProperty()
+ {
+ MockObject mockRoot = model.getRoot();
+ String rootId = mockRoot.getId();
+ int rootV0 = mockRoot.getVersion();
+
+ //
+ StructuralObject root0 = ssc.load(rootId);
+ StructuralState rootState0 = root0.getState();
+ assertEquals(Collections.EMPTY_MAP, rootState0.getProperties());
+
+ // Set
+ mockRoot.setPropertyValue("foo", "bar");
+
+ //
+ int rootV1 = mockRoot.getVersion();
+ assertTrue(rootV1 > rootV0);
+ assertEquals(Collections.singleton("foo"), mockRoot.getPropertyNames());
+ assertEquals("bar", mockRoot.getPropertyValue("foo"));
+ assertEquals(Collections.EMPTY_MAP, rootState0.getProperties());
+ assertStale(root0);
+ StructuralObject root1 = ssc.load(rootId);
+ assertNotNull(root1);
+ assertNotStale(root1);
+ StructuralState rootState1 = root1.getState();
+ assertEquals(Collections.singletonMap("foo", "bar"),
rootState1.getProperties());
+
+ // Update
+ ssc.update(listener, root1, Collections.singletonMap("foo",
"bar2"));
+
+ //
+ int rootV2 = mockRoot.getVersion();
+ assertTrue(rootV2 > rootV1);
+ assertEquals(Collections.singleton("foo"), mockRoot.getPropertyNames());
+ assertEquals("bar2", mockRoot.getPropertyValue("foo"));
+ assertEquals(Collections.EMPTY_MAP, rootState0.getProperties());
+ assertStale(root0);
+ assertStale(root1);
+
+ //
+ StructuralObject root2_0 = universe.get(rootId);
+ assertNotNull(root2_0);
+ assertNotStale(root2_0);
+ StructuralState rootState2_0 = root2_0.getState();
+ assertEquals(Collections.singletonMap("foo", "bar2"),
rootState2_0.getProperties());
+ StructuralObject root2_1 = ssc.load(rootId);
+ assertNotNull(root2_1);
+ assertNotStale(root2_1);
+ StructuralState rootState2_1 = root2_1.getState();
+ assertEquals(Collections.singletonMap("foo", "bar2"),
rootState2_1.getProperties());
+ }
+
+ private void assertStale(StructuralObject object)
+ {
+ try
+ {
+ ssc.loadParent(object);
+ fail();
+ }
+ catch (StaleStateException ignore)
+ {
+ }
+ try
+ {
+ ssc.loadChildren(object);
+ fail();
+ }
+ catch (StaleStateException ignore)
+ {
+ }
+ }
+
+ private void assertNotStale(StructuralObject object)
+ {
+ ssc.loadParent(object);
+ ssc.loadChildren(object);
+ }
+
+ public void testAddChild()
+ {
+ MockObject mockRoot = model.getRoot();
+ int rootV0 = mockRoot.getVersion();
+
+ //
+ String rootId = mockRoot.getId();
+ StructuralObject root = ssc.load(rootId);
+
+ //
+ MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
+ assertNotNull(mockFoo);
+ String fooId = mockFoo.getId();
+
+ //
+ assertNotNull(fooId);
+ assertEquals("foo", mockFoo.getName());
+ assertEquals(MockObject.Type.PORTAL, mockFoo.getType());
+ assertSame(mockRoot, mockFoo.getParent());
+ assertEquals(Collections.singletonList(mockFoo), mockRoot.getChildren());
+ assertEquals(Collections.EMPTY_SET, mockFoo.getPropertyNames());
+ assertTrue(mockRoot.getVersion() > rootV0);
+
+ //
+ try
+ {
+ ssc.loadParent(root);
+ fail();
+ }
+ catch (StaleStateException ignore)
+ {
+ }
+ try
+ {
+ ssc.loadChildren(root);
+ fail();
+ }
+ catch (StaleStateException ignore)
+ {
+ }
+
+ //
+ root = ssc.load(rootId);
+ assertNotNull(root);
+ assertEquals(rootId, root.getId());
+
+ //
+ List<StructuralObject> children = ssc.loadChildren(root);
+ assertNotNull(children);
+ assertEquals(1, children.size());
+ StructuralObject foo = children.get(0);
+ assertNotNull(foo);
+ assertEquals(fooId, foo.getId());
+ StructuralState fooState = foo.getState();
+ assertNotNull(fooState);
+ assertEquals("foo", fooState.getName());
+ assertEquals(Collections.EMPTY_MAP, fooState.getProperties());
+ assertEquals(UIPortal.class, fooState.getType());
+ root = ssc.loadParent(foo);
+ assertNotNull(root);
+ assertEquals(rootId, root.getId());
+ }
+
+}
Deleted:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockObject.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockObject.java 2007-12-04
00:58:53 UTC (rev 9262)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockObject.java 2007-12-04
01:02:12 UTC (rev 9263)
@@ -1,120 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.test.model;
-
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.UIPage;
-import org.jboss.portal.presentation.model.UIPortal;
-import org.jboss.portal.presentation.model.UIWindow;
-import org.jboss.portal.presentation.model.state.structural.StructuralState;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
-
-import java.util.Set;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public interface MockObject
-{
-
- /**
- *
- */
- public enum Type
- {
-
- PORTAL(UIPortal.class), PAGE(UIPage.class), WINDOW(UIWindow.class),
CONTEXT(UIContext.class);
-
- /** . */
- final Class<? extends UIObject> clazz;
-
- Type(Class<? extends UIObject> clazz)
- {
- this.clazz = clazz;
- }
- }
-
- public abstract static class UpdateBehavior
- {
- public static UpdateBehavior veto()
- {
- return new Veto();
- }
- public static UpdateBehavior failure(Throwable throwable)
- {
- return new Failure(throwable);
- }
- }
-
- static class Veto extends UpdateBehavior
- {
- }
-
- static class Failure extends UpdateBehavior
- {
-
- /** . */
- final Throwable throwable;
-
- public Failure(Throwable throwable)
- {
- this.throwable = throwable;
- }
-
- public <T extends Throwable> Failure throwAs(Class<T> type) throws T
- {
- if (type.isInstance(throwable))
- {
- throw type.cast(throwable);
- }
- return this;
- }
- }
-
- Type getType();
-
- String getName();
-
- String getId();
-
- String getPropertyValue(String propertyName);
-
- void setPropertyBehavior(String propertyName, UpdateBehavior propertyBehavior);
-
- UpdateBehavior getPropertyBehavior(String propertyName);
-
- void setPropertyValue(String propertyName, String propertyValue);
-
- Set<String> getPropertyNames();
-
- MockObject addChild(String name, Type type);
-
- /**
- * Creates and returns a snapshot of the state.
- *
- * @return the state snapshot
- */
- StructuralObject takeSnapshot();
-}