Skip to content

Commit

Permalink
Clean test to remove unimplemented unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mbats committed Sep 11, 2013
1 parent 70011b2 commit 5307884
Show file tree
Hide file tree
Showing 17 changed files with 885 additions and 2,089 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3329,7 +3329,7 @@ Document {

M@

Scenario: Add related elements of a class [Add related elements]@unit
Scenario: Add related elements of a class [Add related elements]
Given: An UML model with class diagram elements
When: I ask for the related elements of $'Class1'
Then: The number of related elements found is $'3'
Expand Down

Large diffs are not rendered by default.

1,155 changes: 0 additions & 1,155 deletions documents/org.obeonetwork.dsl.uml2.doc.specification/intent.specification

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -294,3 +294,9 @@ Feature : Class diagram
When I select the remove tool from the palette and I click on a package in the class diagram
Then The package exists in the model
Then The package does not appear anymore on the diagram
Story : Add related elements
Scenario : Add related elements of a class
Given An UML model with class diagram elements
When I ask for the related elements of
Then The number of related elements found is
Then The related elements are

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -105,51 +105,24 @@ public void tearDown() {
// End of user code
}
/**
* Action : I drop a node to an activity
*/
public void actionIDropANodeToAnActivity() {
// Start of user code IDropANodeToAnActivity
node = activityUnderTest.getNode(IN_ACTIVITY_ACTION);
services.dropNode(activityUnderTest, node);
// End of user code
}

/**
* Action : I create an input pin on a call operation action
* Action : I create an output pin on a call operation action
*/
public void actionICreateAnInputPinOnACallOperationAction() {
// Start of user code ICreateAnInputPinOnACallOperationAction
public void actionICreateAnOutputPinOnACallOperationAction() {
// Start of user code ICreateAnOutputPinOnACallOperationAction
action = UMLFactory.eINSTANCE.createCallOperationAction();
services.createInputPin(action);
// End of user code
}

/**
* Action : I query the activity nodes of an activity partition
*/
public void actionIQueryTheActivityNodesOfAnActivityPartition() {
// Start of user code IQueryTheActivityNodesOfAnActivityPartition
node = activityUnderTest.getNode("InPartition1");
foundNodes = services.getActivityNodes(activityUnderTest.getPartition(P1));
services.createOutputPin(action);
// End of user code
}

/**
* Action : I query the activity nodes of an activity
* Action : I drop a node to a partition
*/
public void actionIQueryTheActivityNodesOfAnActivity() {
// Start of user code IQueryTheActivityNodesOfAnActivity
public void actionIDropANodeToAPartition() {
// Start of user code IDropANodeToAPartition
node = activityUnderTest.getNode(IN_ACTIVITY_ACTION);
foundNodes = services.getActivityNodes(activityUnderTest);
// End of user code
}

/**
* Action : I query all the activity partitions of an activity
*/
public void actionIQueryAllTheActivityPartitionsOfAnActivity() {
// Start of user code IQueryAllTheActivityPartitionsOfAnActivity
partition = activityUnderTest.getPartition(P1);

services.dropNode(partition, node);
// End of user code
}

Expand All @@ -163,6 +136,16 @@ public void actionICreateAnInputPinOnAnOpaqueAction() {
// End of user code
}

/**
* Action : I query the activity nodes of an activity partition
*/
public void actionIQueryTheActivityNodesOfAnActivityPartition() {
// Start of user code IQueryTheActivityNodesOfAnActivityPartition
node = activityUnderTest.getNode("InPartition1");
foundNodes = services.getActivityNodes(activityUnderTest.getPartition(P1));
// End of user code
}

/**
* Action : I drop a partition to another partition
*/
Expand All @@ -173,6 +156,17 @@ public void actionIDropAPartitionToAnotherPartition() {
services.dropNode(partition2, partition); // End of user code
}

/**
* Action : I drop a partition to an activity
*/
public void actionIDropAPartitionToAnActivity() {
// Start of user code IDropAPartitionToAnActivity
partition = activityUnderTest.getPartition(P1);
partition2 = activityUnderTest.getPartition("p2");
services.dropNode(activityUnderTest, partition);
// End of user code
}

/**
* Action : I initialize an activity for an operation
*/
Expand All @@ -191,6 +185,15 @@ public void assertAnActivityIsCreated() {
// End of user code
}

/**
* Action : I query all the activity partitions of an activity
*/
public void actionIQueryAllTheActivityPartitionsOfAnActivity() {
// Start of user code IQueryAllTheActivityPartitionsOfAnActivity
partition = activityUnderTest.getPartition(P1);
// End of user code
}

/**
* Action : I query the parent activity of an activity partition
*/
Expand All @@ -201,57 +204,87 @@ public void actionIQueryTheParentActivityOfAnActivityPartition() {
}

/**
* Action : I create an output pin on a call operation action
* Action : I create an output pin on an opaque action
*/
public void actionICreateAnOutputPinOnACallOperationAction() {
// Start of user code ICreateAnOutputPinOnACallOperationAction
action = UMLFactory.eINSTANCE.createCallOperationAction();
public void actionICreateAnOutputPinOnAnOpaqueAction() {
// Start of user code ICreateAnOutputPinOnAnOpaqueAction
action = UMLFactory.eINSTANCE.createOpaqueAction();
services.createOutputPin(action);
// End of user code
}

/**
* Action : I drop a node to a partition
* Action : I create an input pin on a call operation action
*/
public void actionIDropANodeToAPartition() {
// Start of user code IDropANodeToAPartition
node = activityUnderTest.getNode(IN_ACTIVITY_ACTION);
partition = activityUnderTest.getPartition(P1);

services.dropNode(partition, node);
public void actionICreateAnInputPinOnACallOperationAction() {
// Start of user code ICreateAnInputPinOnACallOperationAction
action = UMLFactory.eINSTANCE.createCallOperationAction();
services.createInputPin(action);
// End of user code
}

/**
* Action : I create an output pin on an opaque action
* Action : I drop a node to an activity
*/
public void actionICreateAnOutputPinOnAnOpaqueAction() {
// Start of user code ICreateAnOutputPinOnAnOpaqueAction
action = UMLFactory.eINSTANCE.createOpaqueAction();
services.createOutputPin(action);
public void actionIDropANodeToAnActivity() {
// Start of user code IDropANodeToAnActivity
node = activityUnderTest.getNode(IN_ACTIVITY_ACTION);
services.dropNode(activityUnderTest, node);
// End of user code
}

/**
* Action : I drop a partition to an activity
* Action : I query the activity nodes of an activity
*/
public void actionIDropAPartitionToAnActivity() {
// Start of user code IDropAPartitionToAnActivity
partition = activityUnderTest.getPartition(P1);
partition2 = activityUnderTest.getPartition("p2");
services.dropNode(activityUnderTest, partition);
public void actionIQueryTheActivityNodesOfAnActivity() {
// Start of user code IQueryTheActivityNodesOfAnActivity
node = activityUnderTest.getNode(IN_ACTIVITY_ACTION);
foundNodes = services.getActivityNodes(activityUnderTest);
// End of user code
}

/**
* Behavior : I get all the parent activity partition nodes
* Behavior : The activity contains the partition
*/
public void assertIGetAllTheParentActivityPartitionNodes() {
// Start of user code IGetAllTheParentActivityPartitionNodes
assertEquals(1, foundNodes.size());
assertEquals(node, foundNodes.get(0));
public void assertTheActivityContainsThePartition() {
// Start of user code TheActivityContainsThePartition
assertFalse(partition2.getSubpartitions().contains(partition));
assertTrue(activityUnderTest.getPartitions().contains(partition));
// End of user code
}
/**
* Behavior : The parent partition contains the dropped partition
*/
public void assertTheParentPartitionContainsTheDroppedPartition() {
// Start of user code TheParentPartitionContainsTheDroppedPartition
assertTrue(partition2.getSubpartitions().contains(partition));
assertFalse(activityUnderTest.getPartitions().contains(partition));
// End of user code
}
/**
* Behavior : I get the parent activity
*/
public void assertIGetTheParentActivity() {
// Start of user code IGetTheParentActivity
assertEquals(activityUnderTest, services.findParentActivity(partition));

assertEquals(Collections.EMPTY_LIST, services.getActivityNodes(UMLFactory.eINSTANCE.createClass()));
assertNull(services.findParentActivity(UMLFactory.eINSTANCE.createClass()));
// End of user code
}
/**
* Behavior : The activity contains the node
*/
public void assertTheActivityContainsTheNode() {
// Start of user code TheActivityContainsTheNode
assertTrue(node.getInPartitions().isEmpty());
// End of user code
}
/**
* Behavior : The partition contains the node
*/
public void assertThePartitionContainsTheNode() {
// Start of user code ThePartitionContainsTheNode
assertTrue(partition.getNodes().contains(node));
// End of user code
}
/**
Expand All @@ -264,11 +297,14 @@ public void assertAnActivityWhichReferencedTheOperationIsCreated() {
// End of user code
}
/**
* Behavior : An output pin is created on the call operation action
* Behavior : I get all the parent activity partition nodes
*/
public void assertAnOutputPinIsCreatedOnTheCallOperationAction() {
// Start of user code AnOutputPinIsCreatedOnTheCallOperationAction
assertFalse(((CallOperationAction)action).getResults().isEmpty());
public void assertIGetAllTheParentActivityPartitionNodes() {
// Start of user code IGetAllTheParentActivityPartitionNodes
assertEquals(1, foundNodes.size());
assertEquals(node, foundNodes.get(0));

assertEquals(Collections.EMPTY_LIST, services.getActivityNodes(UMLFactory.eINSTANCE.createClass()));
// End of user code
}
/**
Expand All @@ -281,23 +317,6 @@ public void assertIGetAllTheActivityPartitionsDefinedForTheActivity() {
assertNull(services.getActivityPartitions(UMLFactory.eINSTANCE.createClass()));
// End of user code
}
/**
* Behavior : The activity contains the partition
*/
public void assertTheActivityContainsThePartition() {
// Start of user code TheActivityContainsThePartition
assertFalse(partition2.getSubpartitions().contains(partition));
assertTrue(activityUnderTest.getPartitions().contains(partition));
// End of user code
}
/**
* Behavior : The activity contains the node
*/
public void assertTheActivityContainsTheNode() {
// Start of user code TheActivityContainsTheNode
assertTrue(node.getInPartitions().isEmpty());
// End of user code
}
/**
* Behavior : An input pin is created on the opaque action
*/
Expand All @@ -306,14 +325,6 @@ public void assertAnInputPinIsCreatedOnTheOpaqueAction() {
assertFalse(((OpaqueAction)action).getInputValues().isEmpty());
// End of user code
}
/**
* Behavior : The partition contains the node
*/
public void assertThePartitionContainsTheNode() {
// Start of user code ThePartitionContainsTheNode
assertTrue(partition.getNodes().contains(node));
// End of user code
}
/**
* Behavior : An input pin is created on the call operation action
*/
Expand All @@ -323,12 +334,11 @@ public void assertAnInputPinIsCreatedOnTheCallOperationAction() {
// End of user code
}
/**
* Behavior : I get all the parent activity nodes
* Behavior : An output pin is created on the call operation action
*/
public void assertIGetAllTheParentActivityNodes() {
// Start of user code IGetAllTheParentActivityNodes
assertEquals(1, foundNodes.size());
assertEquals(node, foundNodes.get(0));
public void assertAnOutputPinIsCreatedOnTheCallOperationAction() {
// Start of user code AnOutputPinIsCreatedOnTheCallOperationAction
assertFalse(((CallOperationAction)action).getResults().isEmpty());
// End of user code
}
/**
Expand All @@ -340,22 +350,12 @@ public void assertAnOutputPinIsCreatedOnTheOpaqueAction() {
// End of user code
}
/**
* Behavior : I get the parent activity
*/
public void assertIGetTheParentActivity() {
// Start of user code IGetTheParentActivity
assertEquals(activityUnderTest, services.findParentActivity(partition));

assertNull(services.findParentActivity(UMLFactory.eINSTANCE.createClass()));
// End of user code
}
/**
* Behavior : The parent partition contains the dropped partition
* Behavior : I get all the parent activity nodes
*/
public void assertTheParentPartitionContainsTheDroppedPartition() {
// Start of user code TheParentPartitionContainsTheDroppedPartition
assertTrue(partition2.getSubpartitions().contains(partition));
assertFalse(activityUnderTest.getPartitions().contains(partition));
public void assertIGetAllTheParentActivityNodes() {
// Start of user code IGetAllTheParentActivityNodes
assertEquals(1, foundNodes.size());
assertEquals(node, foundNodes.get(0));
// End of user code
}

Expand Down
Loading

0 comments on commit 5307884

Please sign in to comment.