@Test public void testValidBgpSessionStatusValue() throws IOException { JsonNode sessionStatusNode = _mapper.readTree("\"sessionStatus\""); Variable variable = new Variable(); variable.setType(BGP_SESSION_STATUS); Client.validateType(sessionStatusNode, variable); }
@Test public void testValidInterfaceValue() throws IOException { JsonNode interfaceNode = _mapper.readTree("\"interfaceName\""); Variable variable = new Variable(); variable.setType(INTERFACE); Client.validateType(interfaceNode, variable); }
@Test public void testValidRoutingProtocolSpecValue() throws IOException { JsonNode rpsNode = _mapper.readTree("\"all\""); Variable variable = new Variable(); variable.setType(ROUTING_PROTOCOL_SPEC); Client.validateType(rpsNode, variable); }
@Test public void testValidBooleanValue() throws IOException { JsonNode booleanNode = _mapper.readTree("true"); Variable variable = new Variable(); variable.setType(BOOLEAN); Client.validateType(booleanNode, variable); }
@Test public void testValidComparatorValue() throws IOException { JsonNode comparatorNode = _mapper.readTree("\">=\""); Variable variable = new Variable(); variable.setType(COMPARATOR); Client.validateType(comparatorNode, variable); }
@Test public void testValidIntegerValue() throws IOException { JsonNode integerNode = _mapper.readTree("15"); Variable variable = new Variable(); variable.setType(INTEGER); Client.validateType(integerNode, variable); }
@Test public void testValidJsonPathValue() throws IOException { JsonNode jsonPathNode = _mapper.readTree("{\"path\" : \"I am path.\", \"suffix\" : true}"); Variable variable = new Variable(); variable.setType(JSON_PATH); Client.validateType(jsonPathNode, variable); }
@Test public void testValidLongValue() { Long longValue = 15L; JsonNode floatNode = _mapper.valueToTree(longValue); Variable variable = new Variable(); variable.setType(LONG); Client.validateType(floatNode, variable); }
@Test public void testValidVrfValue() throws IOException { JsonNode vrfNode = _mapper.readTree("\"vrfName\""); Variable variable = new Variable(); variable.setType(VRF); Client.validateType(vrfNode, variable); }
@Test public void testValidAddressGroupValue() throws IOException { JsonNode addressGroupNode = _mapper.readTree("\"addressGroupName\""); Variable variable = new Variable(); variable.setType(ADDRESS_GROUP); Client.validateType(addressGroupNode, variable); }
@Test public void testValidBgpSessionTypeValue() throws IOException { JsonNode sessionTypeNode = _mapper.readTree("\"sessionType\""); Variable variable = new Variable(); variable.setType(BGP_SESSION_TYPE); Client.validateType(sessionTypeNode, variable); }
@Test public void testValidDoubleValue() throws IOException { JsonNode doubleNode = _mapper.readTree("15.0"); Variable variable = new Variable(); variable.setType(DOUBLE); Client.validateType(doubleNode, variable); }
@Test public void testValidIpWildcardValue() throws IOException { JsonNode ipWildcardNode = _mapper.readTree("\"10.168.5.5:10.168.100.100\""); Variable variable = new Variable(); variable.setType(IP_WILDCARD); Client.validateType(ipWildcardNode, variable); }
@Test public void testValidIpsecSessionStatusValue() throws IOException { JsonNode ipsecSessionStatusNode = _mapper.readTree("\"sessionStatus\""); Variable variable = new Variable(); variable.setType(IPSEC_SESSION_STATUS); Client.validateType(ipsecSessionStatusNode, variable); }
@Test public void testValidJsonPathRegexValue() throws IOException { JsonNode jsonPathRegexNode = _mapper.readTree("\"/.*/\""); Variable variable = new Variable(); variable.setType(JSON_PATH_REGEX); Client.validateType(jsonPathRegexNode, variable); }
@Test public void testValidStructureNameValue() throws IOException { JsonNode structureNameNode = _mapper.readTree("\"structureName\""); Variable variable = new Variable(); variable.setType(STRUCTURE_NAME); Client.validateType(structureNameNode, variable); }
@Test public void testValidFlowStateValue() throws IOException { JsonNode flowStateNode = _mapper.readTree("\"ESTABLISHED\""); Variable variable = new Variable(); variable.setType(FLOW_STATE); Client.validateType(flowStateNode, variable); }
@Test public void testValidInterfacesSpecValue() throws IOException { JsonNode interfacesSpecNode = _mapper.readTree("\"TYPE:LOOPBACK\""); Variable variable = new Variable(); variable.setType(INTERFACES_SPEC); Client.validateType(interfacesSpecNode, variable); }
@Test public void testValidIpProtocolValue() throws IOException { JsonNode ipProtocolNode = _mapper.readTree("\"visa\""); Variable variable = new Variable(); variable.setType(IP_PROTOCOL); Client.validateType(ipProtocolNode, variable); }
@Test public void testSatisfiedMinLengthValue() throws IOException { String longString = "\"long enough\""; Variable variable = new Variable(); variable.setMinLength(8); variable.setType(STRING); Client.validateType(_mapper.readTree(longString), variable); }