summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-08-13 03:40:59 (EDT)
committerEike Stepper2006-08-13 03:40:59 (EDT)
commit2f7d34e885cc9fb942c8e08ac313ed0de6cefbae (patch)
treed008ac592595c4cd2a6297e912b23233601295e8
parent724e5f4a78e8fc78ee6bd4d0e2f51c638eaf72ed (diff)
downloadcdo-2f7d34e885cc9fb942c8e08ac313ed0de6cefbae.zip
cdo-2f7d34e885cc9fb942c8e08ac313ed0de6cefbae.tar.gz
cdo-2f7d34e885cc9fb942c8e08ac313ed0de6cefbae.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/BasicTest.java180
1 files changed, 91 insertions, 89 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/BasicTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/BasicTest.java
index a939332..e1ab807 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/BasicTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/BasicTest.java
@@ -19,93 +19,93 @@ import testmodel1.TreeNode;
@SuppressWarnings("unused")
public class BasicTest extends AbstractModel1Test
{
- public void testSimple() throws Exception
- {
- final String RESOURCE = "/test/res";
- final String ROOT = "root";
- final String[] CHILDREN = { "a", "b", "c"};
-
- // Execution
- {
- TreeNode root = createNode(ROOT);
- for (String name : CHILDREN)
- createNode(name, root);
-
- saveRoot(root, RESOURCE);
- }
-
- // Verification
- {
- TreeNode root = (TreeNode) loadRoot(RESOURCE);
- assertNode(ROOT, root);
-
- EList children = root.getChildren();
- assertChildren(CHILDREN, children);
- }
- }
-
- public void testContainment() throws Exception
- {
- final String RESOURCE = "/test/res";
- final String ROOT = "root";
- final String[] CHILDREN_A = { "a1", "a2", "a3", "a4"};
- final String[] CHILDREN_B = { "b1", "b2", "b3", "b4"};
-
- // Execution
- {
- TreeNode root = createNode(ROOT);
- TreeNode a = root;
- for (String name : CHILDREN_A)
- a = createNode(name, a);
-
- TreeNode b = root;
- for (String name : CHILDREN_B)
- b = createNode(name, b);
-
- saveRoot(root, RESOURCE);
- }
-
- // Verification
- {
- TreeNode root = (TreeNode) loadRoot(RESOURCE);
- assertNode(ROOT, root);
- assertPath(CHILDREN_A, root);
- assertPath(CHILDREN_B, root);
- }
- }
-
- public void testXRefAlreadyLoaded() throws Exception
- {
- final String RESOURCE = "/test/res";
- final String ROOT = "root";
- final String[] CHILDREN_A = { "a1", "a2", "a3", "a4"};
- final String[] CHILDREN_B = { "b1", "b2", "b3", "b4"};
-
- // Execution
- {
- TreeNode root = createNode(ROOT);
- TreeNode a = root;
- for (String name : CHILDREN_A)
- a = createNode(name, a);
-
- TreeNode b = root;
- for (String name : CHILDREN_B)
- b = createNode(name, b);
-
- a.getReferences().add(b);
- saveRoot(root, RESOURCE);
- }
-
- // Verification
- {
- TreeNode root = (TreeNode) loadRoot(RESOURCE);
- assertNode(ROOT, root);
-
- TreeNode a = findPath(CHILDREN_A, root);
- TreeNode b = findPath(CHILDREN_B, root); // PRE-LOAD
- assertNode(CHILDREN_B[3], (TreeNode) a.getReferences().get(0));
- }
- }
+ // public void testSimple() throws Exception
+ // {
+ // final String RESOURCE = "/test/res";
+ // final String ROOT = "root";
+ // final String[] CHILDREN = { "a", "b", "c"};
+ //
+ // // Execution
+ // {
+ // TreeNode root = createNode(ROOT);
+ // for (String name : CHILDREN)
+ // createNode(name, root);
+ //
+ // saveRoot(root, RESOURCE);
+ // }
+ //
+ // // Verification
+ // {
+ // TreeNode root = (TreeNode) loadRoot(RESOURCE);
+ // assertNode(ROOT, root);
+ //
+ // EList children = root.getChildren();
+ // assertChildren(CHILDREN, children);
+ // }
+ // }
+ //
+ // public void testContainment() throws Exception
+ // {
+ // final String RESOURCE = "/test/res";
+ // final String ROOT = "root";
+ // final String[] CHILDREN_A = { "a1", "a2", "a3", "a4"};
+ // final String[] CHILDREN_B = { "b1", "b2", "b3", "b4"};
+ //
+ // // Execution
+ // {
+ // TreeNode root = createNode(ROOT);
+ // TreeNode a = root;
+ // for (String name : CHILDREN_A)
+ // a = createNode(name, a);
+ //
+ // TreeNode b = root;
+ // for (String name : CHILDREN_B)
+ // b = createNode(name, b);
+ //
+ // saveRoot(root, RESOURCE);
+ // }
+ //
+ // // Verification
+ // {
+ // TreeNode root = (TreeNode) loadRoot(RESOURCE);
+ // assertNode(ROOT, root);
+ // assertPath(CHILDREN_A, root);
+ // assertPath(CHILDREN_B, root);
+ // }
+ // }
+ //
+ // public void testXRefAlreadyLoaded() throws Exception
+ // {
+ // final String RESOURCE = "/test/res";
+ // final String ROOT = "root";
+ // final String[] CHILDREN_A = { "a1", "a2", "a3", "a4"};
+ // final String[] CHILDREN_B = { "b1", "b2", "b3", "b4"};
+ //
+ // // Execution
+ // {
+ // TreeNode root = createNode(ROOT);
+ // TreeNode a = root;
+ // for (String name : CHILDREN_A)
+ // a = createNode(name, a);
+ //
+ // TreeNode b = root;
+ // for (String name : CHILDREN_B)
+ // b = createNode(name, b);
+ //
+ // a.getReferences().add(b);
+ // saveRoot(root, RESOURCE);
+ // }
+ //
+ // // Verification
+ // {
+ // TreeNode root = (TreeNode) loadRoot(RESOURCE);
+ // assertNode(ROOT, root);
+ //
+ // TreeNode a = findPath(CHILDREN_A, root);
+ // TreeNode b = findPath(CHILDREN_B, root); // PRE-LOAD
+ // assertNode(CHILDREN_B[3], (TreeNode) a.getReferences().get(0));
+ // }
+ // }
public void testXRefNotYetLoaded() throws Exception
{
@@ -135,8 +135,10 @@ public class BasicTest extends AbstractModel1Test
assertNode(ROOT, root);
TreeNode a = findPath(CHILDREN_A, root);
- // DO NOT LOAD: TreeNode b = findPath(CHILDREN_B, root);
- assertNode(CHILDREN_B[3], (TreeNode) a.getReferences().get(0));
+ // DO NOT LOAD BY CONTAINMENT:
+ // TreeNode b = findPath(CHILDREN_B, root);
+ TreeNode b = (TreeNode) a.getReferences().get(0);
+ assertNode(CHILDREN_B[3], b);
}
}
}