Search in sources :

Example 66 with SiteNode

use of org.parosproxy.paros.model.SiteNode in project zaproxy by zaproxy.

the class StructuralSiteNodeUnitTest method shouldConstructWithNonNullNode.

@Test
void shouldConstructWithNonNullNode() {
    // Given
    SiteNode node = mock(SiteNode.class);
    // When / Then
    assertDoesNotThrow(() -> new StructuralSiteNode(node));
}
Also used : SiteNode(org.parosproxy.paros.model.SiteNode) Test(org.junit.jupiter.api.Test)

Example 67 with SiteNode

use of org.parosproxy.paros.model.SiteNode in project zaproxy by zaproxy.

the class StructuralSiteNodeUnitTest method shouldNotAllowToConstructWithNullNode.

@Test
void shouldNotAllowToConstructWithNullNode() {
    // Given
    SiteNode node = null;
    // When / Then
    assertThrows(NullPointerException.class, () -> new StructuralSiteNode(node));
}
Also used : SiteNode(org.parosproxy.paros.model.SiteNode) Test(org.junit.jupiter.api.Test)

Example 68 with SiteNode

use of org.parosproxy.paros.model.SiteNode in project zaproxy by zaproxy.

the class TargetUnitTest method shouldNotSetNullStartSiteNode.

@Test
void shouldNotSetNullStartSiteNode() {
    // Given
    SiteNode siteNode = null;
    Target target = new Target();
    // When
    target.setStartNode(siteNode);
    // Then
    assertThat(target.getStartNode(), is(nullValue()));
    assertThat(target.getStartNodes(), is(nullValue()));
}
Also used : SiteNode(org.parosproxy.paros.model.SiteNode) Test(org.junit.jupiter.api.Test)

Aggregations

SiteNode (org.parosproxy.paros.model.SiteNode)68 DatabaseException (org.parosproxy.paros.db.DatabaseException)11 JTree (javax.swing.JTree)9 TreeNode (javax.swing.tree.TreeNode)9 TreePath (javax.swing.tree.TreePath)9 Target (org.zaproxy.zap.model.Target)9 URIException (org.apache.commons.httpclient.URIException)8 SiteMap (org.parosproxy.paros.model.SiteMap)8 ArrayList (java.util.ArrayList)7 HistoryReference (org.parosproxy.paros.model.HistoryReference)7 HttpMalformedHeaderException (org.parosproxy.paros.network.HttpMalformedHeaderException)7 Context (org.zaproxy.zap.model.Context)7 Test (org.junit.jupiter.api.Test)5 Alert (org.parosproxy.paros.core.scanner.Alert)5 Session (org.parosproxy.paros.model.Session)5 IOException (java.io.IOException)4 List (java.util.List)4 RecordStructure (org.parosproxy.paros.db.RecordStructure)4 ActionEvent (java.awt.event.ActionEvent)3 PatternSyntaxException (java.util.regex.PatternSyntaxException)3