Skip to content

Package: NewRouterAction

NewRouterAction

nameinstructionbranchcomplexitylinemethod
NewRouterAction(ConfigurationGraph)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
createNode(Point)
M: 12 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: package networkconfigurator.actions;
2:
3: import java.awt.Point;
4:
5: import model.assignment.VariableAssignment;
6: import networkconfigurator.ConfigurationGraph;
7: import networkconfigurator.item.Node;
8: import networkconfigurator.item.Router;
9:
10: /**
11: * Action for adding a new Router.
12: *
13: * @author Erik Arand
14: *
15: */
16: public class NewRouterAction extends AbstractNewAction {
17:         /**
18:          * action for a new Internet-Object.
19:          *
20:          * @param graph
21:          * the graph.
22:          */
23:         public NewRouterAction(final ConfigurationGraph graph) {
24:                 super(graph);
25:         }
26:
27:         @Override
28:         protected Node createNode(final Point p) {
29:                 return new Router(p, new VariableAssignment(null, null, "Router", null));
30:         }
31:
32: }