use of org.parosproxy.paros.core.scanner.Variant in project zaproxy by zaproxy.
the class SessionStructureUnitTest method shouldReturnOverridenPathTree.
@Test
void shouldReturnOverridenPathTree() throws Exception {
// Given
URI uri = new URI("https://www.example.com/path?a=b", true);
HttpMessage msg = new HttpMessage(uri);
Variant variant = new PathTreeVariant();
factory.addVariant(variant.getClass());
List<String> expectedTreePath = variant.getTreePath(msg);
// When
List<String> actualTreePath = SessionStructure.getTreePath(model, msg);
// Then
assertThat(actualTreePath.size(), is(equalTo(expectedTreePath.size())));
for (int i = 0; i < actualTreePath.size(); i++) {
assertThat(actualTreePath.get(i), is(equalTo(expectedTreePath.get(i))));
}
}
Aggregations