Test Requirements ----------------- The purpose of this testing suite is to test the core part of Demeter/Java. The software is given a class graph and a strategy graph with which it generates Java code for object graph traversal which traverses the object graphs according to the strategy graph. The specification of the software is at: http://www.ccs.neu.edu/research/demeter/biblio/strategies.html a. The Traversal graph is a combination of strategy graph and class graph. b. The Class Graph i. The Class graph has two kind of classes: abstract and concrete. ii. The Class graph allows two inter class relationships: inheritance and uses. Inheritance supports simple and multiple inheritance. Multiple inheritance is not allowed in Demeter/Java, so no testing is done by Demeter/Java on this. Uses has four cardinalities: 0 or 1, 1, 1 to many and many to many. Many to many is achieved by bidirectional 1 to many relationships , but is not supported by Demeter/Java). c. Strategy Graph specifies the start, end node and zero to many nodes or edges in between. i. from - start node. ii. via/through -- nodes/edges in between,can be 0, 1 or many. ??? iii. only through -- nodes/edges in between,can be 0, 1 or many. iv. bypassing -- nodes/edges in between,can be 0, 1 or many. vi. to -- end node. ??? to-stop d. Object Graph -- Built according to the relationships between classes ??? i. optional relationship -- an object graph may or may not contain certain instances. ii. 1 to many relationship -- an object graph may contain 1 to many instances of a class. 1. Testing the Class Graph: ----------------------- 1.1 Check if there is a limit on the class name. There is nothing specified by the specification. It should be dynamic and virtually limitless. 1.2 Check the depth of a graph. How many levels can be in a graph. a. Test for Abstract classes inheritance using alteration edges. b. Test for Abstract classes inheritance using both alteration edges and construction edges. c. Test for concrete classes using construction edges. 1.3 Check the width of a graph how many nodes can hang from one node. a. This should be checked for an abstract class with abstract offsprings. b. This should be checked for an abstract class with concrete offsprings. c. This should be checked for an concrete class with concrete offsprings. Simple traversals should be tested for different types of Class graphs. 1.4 Testing a Graph with inheritance relationship (alteration relation). 1.5 Testing Graphs with construction relations within the classes. Varying with all possibilities: construction edges, optional edges, repetition edges and optional repetition edges. 1.6 Testing Graphs with combination of both alteration and construction relations. 2. Testing the Strategy Graph affect in relation to the Class Graph: affect??? ---------------------------------------------------------------- 2.1 Given a start node and end node in a class graph where paths exist between them. The expectation is to print the correct path with the two nodes. 2.2 Given a start node and end node in a class graph where no path exists between them. The expectation is to print a message about no such path. 2.3 Given a start node, end node and a via node/edge in a class graph where paths exist. The expectation is to print the only paths through the via node/edge. 2.4 Given a start node, end node and a via node/edge in a class graph where no path exists. The expectation is to print a message that no such path is found. 2.5 Given a start node, end node and a only through node/edge in a class graph where paths exist. The expectation is to print the only paths through the only through node/edge. 2.6 Given a start node, end node and a only through node/edge in a class graph where no path exists. The expectation is to print a message that no such path is found. 2.7 Given a start node, end node and a bypassing in a class graph where paths exist. The expectation is to print the paths bypass the bypassing node. 2.8 Given a start node, end node and a bypassing node/edge in a class graph where no path exists. The expectation is to print a message that no such path is found. 2.9. Given a start node, end node and via/only through {node1/edge1, node2/edge2} in a class graph where paths exist. The expectation is to print the only paths via/only through the nodes/edges. 2.10 Given a start node, end node and via/only through {node1/edge1, node2/edge2} in a class graph where no path exists. The expectation is to print a message that no such path is found. 2.11 Given a start node, end node and bypassing {node1/edge1, node2/edge2} in a class graph where paths exist. The expectation is to print the paths bypass the nodes/edges. 2.12 Given a start node, end node and a bypassing {node1/edge1, node2/edge2} in a class graph where no path exists. The expectation is to print a message that no such path is found. 2.13 Given a start node, end node and multiple via, bypassing, only through nodes where the paths exist. The expectation is print all the paths. 2.14 Given a start node, end node and multiple via, bypassing, only through nodes where no path exists. The expectation is print a message that no such path is found.