@Test public void testSetGatewayDirection() { GatewayDirection randomDirection = GatewayDirection.CONVERGING; propertyWriter.setGatewayDirection(randomDirection); verify(element).setGatewayDirection(randomDirection); }
public void setGatewayDirection(Node n) { long incoming = countEdges(n.getInEdges()); long outgoing = countEdges(n.getOutEdges()); if (incoming <= 1 && outgoing > 1) { gateway.setGatewayDirection(GatewayDirection.DIVERGING); } else if (incoming > 1 && outgoing <= 1) { gateway.setGatewayDirection(GatewayDirection.CONVERGING); } else { gateway.setGatewayDirection(GatewayDirection.UNSPECIFIED); } }
GatewayPropertyWriter extends PropertyWriter { public void setGatewayDirection(Node n) { long incoming = countEdges(n.getInEdges()); long outgoing = countEdges(n.getOutEdges()); if (incoming <= 1 && outgoing > 1) { gateway.setGatewayDirection(GatewayDirection.DIVERGING); } else if (incoming > 1 && outgoing <= 1) { gateway.setGatewayDirection(GatewayDirection.CONVERGING); } else { gateway.setGatewayDirection(GatewayDirection.UNSPECIFIED); } } }
GatewayPropertyWriter extends PropertyWriter { public void setGatewayDirection(Node n) { long incoming = countEdges(n.getInEdges()); long outgoing = countEdges(n.getOutEdges()); if (incoming <= 1 && outgoing > 1) { gateway.setGatewayDirection(GatewayDirection.DIVERGING); } else if (incoming > 1 && outgoing <= 1) { gateway.setGatewayDirection(GatewayDirection.CONVERGING); } else { gateway.setGatewayDirection(GatewayDirection.UNSPECIFIED); } } GatewayPropertyWriter(Gateway gateway, VariableScope variableScope); }
GatewayPropertyWriter extends PropertyWriter { public void setGatewayDirection(Node n) { long incoming = countEdges(n.getInEdges()); long outgoing = countEdges(n.getOutEdges()); if (incoming <= 1 && outgoing > 1) { gateway.setGatewayDirection(GatewayDirection.DIVERGING); } else if (incoming > 1 && outgoing <= 1) { gateway.setGatewayDirection(GatewayDirection.CONVERGING); } else { gateway.setGatewayDirection(GatewayDirection.UNSPECIFIED); } } GatewayPropertyWriter(Gateway gateway, VariableScope variableScope); void setDefaultRoute(String defaultRouteExpression); void setSource(BasePropertyWriter source); void setTarget(BasePropertyWriter target); void setGatewayDirection(Node n); void setGatewayDirection(GatewayDirection direction); }
GatewayPropertyWriter extends PropertyWriter { public void setGatewayDirection(Node n) { long incoming = countEdges(n.getInEdges()); long outgoing = countEdges(n.getOutEdges()); if (incoming <= 1 && outgoing > 1) { gateway.setGatewayDirection(GatewayDirection.DIVERGING); } else if (incoming > 1 && outgoing <= 1) { gateway.setGatewayDirection(GatewayDirection.CONVERGING); } else { gateway.setGatewayDirection(GatewayDirection.UNSPECIFIED); } } GatewayPropertyWriter(Gateway gateway, VariableScope variableScope); void setDefaultRoute(String defaultRouteExpression); void setSource(BasePropertyWriter source); void setTarget(BasePropertyWriter target); void setGatewayDirection(Node n); void setGatewayDirection(GatewayDirection direction);  }