use of org.batfish.datamodel.questions.Question.InstanceData.Variable in project batfish by batfish.
the class ClientTest method testValidPrefixValue.
@Test
public void testValidPrefixValue() throws IOException {
JsonNode prefixNode = _mapper.readTree("\"10.168.5.5/30\"");
Question.InstanceData.Variable variable = new Question.InstanceData.Variable();
variable.setType(PREFIX);
Client.validateType(prefixNode, variable);
}
use of org.batfish.datamodel.questions.Question.InstanceData.Variable in project batfish by batfish.
the class ClientTest method testValidBooleanValue.
@Test
public void testValidBooleanValue() throws IOException {
JsonNode booleanNode = _mapper.readTree("true");
Question.InstanceData.Variable variable = new Question.InstanceData.Variable();
variable.setType(BOOLEAN);
Client.validateType(booleanNode, variable);
}
use of org.batfish.datamodel.questions.Question.InstanceData.Variable in project batfish by batfish.
the class ClientTest method testValidDoubleValue.
@Test
public void testValidDoubleValue() throws IOException {
JsonNode doubleNode = _mapper.readTree("15.0");
Question.InstanceData.Variable variable = new Question.InstanceData.Variable();
variable.setType(DOUBLE);
Client.validateType(doubleNode, variable);
}
use of org.batfish.datamodel.questions.Question.InstanceData.Variable in project batfish by batfish.
the class ClientTest method testValidLongValue.
@Test
public void testValidLongValue() {
Long longValue = 15L;
JsonNode floatNode = _mapper.valueToTree(longValue);
Question.InstanceData.Variable variable = new Question.InstanceData.Variable();
variable.setType(LONG);
Client.validateType(floatNode, variable);
}
use of org.batfish.datamodel.questions.Question.InstanceData.Variable in project batfish by batfish.
the class ClientTest method testValidJsonPathRegexValue.
@Test
public void testValidJsonPathRegexValue() throws IOException {
JsonNode jsonPathRegexNode = _mapper.readTree("\"/.*/\"");
Question.InstanceData.Variable variable = new Question.InstanceData.Variable();
variable.setType(JSON_PATH_REGEX);
Client.validateType(jsonPathRegexNode, variable);
}
Aggregations