Search in sources :

Example 1 with ServiceCaller

use of com.endava.cats.io.ServiceCaller in project cats by Endava.

the class ZalgoTextInHeadersFuzzerTest method setup.

@BeforeEach
void setup() {
    ServiceCaller serviceCaller = Mockito.mock(ServiceCaller.class);
    TestCaseListener testCaseListener = Mockito.mock(TestCaseListener.class);
    zalgoTextInHeadersFuzzer = new ZalgoTextInHeadersFuzzer(serviceCaller, testCaseListener);
}
Also used : ServiceCaller(com.endava.cats.io.ServiceCaller) TestCaseListener(com.endava.cats.report.TestCaseListener) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with ServiceCaller

use of com.endava.cats.io.ServiceCaller in project cats by Endava.

the class SecurityFuzzerTest method setup.

@BeforeEach
void setup() {
    catsDSLParser = new CatsDSLParser();
    catsUtil = new CatsUtil(catsDSLParser);
    serviceCaller = Mockito.mock(ServiceCaller.class);
    filesArguments = new FilesArguments(catsUtil);
    customFuzzerUtil = new CustomFuzzerUtil(serviceCaller, catsUtil, testCaseListener, catsDSLParser);
    securityFuzzer = new SecurityFuzzer(filesArguments, customFuzzerUtil);
    ReflectionTestUtils.setField(testCaseListener, "testCaseExporter", Mockito.mock(TestCaseExporter.class));
}
Also used : FilesArguments(com.endava.cats.args.FilesArguments) CatsUtil(com.endava.cats.util.CatsUtil) CustomFuzzerUtil(com.endava.cats.fuzzer.CustomFuzzerUtil) ServiceCaller(com.endava.cats.io.ServiceCaller) TestCaseExporter(com.endava.cats.report.TestCaseExporter) CatsDSLParser(com.endava.cats.dsl.CatsDSLParser) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 3 with ServiceCaller

use of com.endava.cats.io.ServiceCaller in project cats by Endava.

the class FunctionalFuzzerTest method setup.

@BeforeEach
void setup() {
    catsDSLParser = new CatsDSLParser();
    catsUtil = new CatsUtil(catsDSLParser);
    serviceCaller = Mockito.mock(ServiceCaller.class);
    filesArguments = new FilesArguments(catsUtil);
    customFuzzerUtil = new CustomFuzzerUtil(serviceCaller, catsUtil, testCaseListener, catsDSLParser);
    functionalFuzzer = new FunctionalFuzzer(filesArguments, customFuzzerUtil);
    filesArguments.getCustomFuzzerDetails().clear();
    ReflectionTestUtils.setField(testCaseListener, "testCaseExporter", Mockito.mock(TestCaseExporter.class));
}
Also used : FilesArguments(com.endava.cats.args.FilesArguments) CatsUtil(com.endava.cats.util.CatsUtil) CustomFuzzerUtil(com.endava.cats.fuzzer.CustomFuzzerUtil) ServiceCaller(com.endava.cats.io.ServiceCaller) TestCaseExporter(com.endava.cats.report.TestCaseExporter) CatsDSLParser(com.endava.cats.dsl.CatsDSLParser) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 4 with ServiceCaller

use of com.endava.cats.io.ServiceCaller in project cats by Endava.

the class AbugidasCharsInHeadersFuzzerTest method setup.

@BeforeEach
void setup() {
    ServiceCaller serviceCaller = Mockito.mock(ServiceCaller.class);
    TestCaseListener testCaseListener = Mockito.mock(TestCaseListener.class);
    abugidasCharsInHeadersFuzzer = new AbugidasCharsInHeadersFuzzer(serviceCaller, testCaseListener);
}
Also used : ServiceCaller(com.endava.cats.io.ServiceCaller) TestCaseListener(com.endava.cats.report.TestCaseListener) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 5 with ServiceCaller

use of com.endava.cats.io.ServiceCaller in project cats by Endava.

the class AbugidasCharsInStringFieldsSanitizeValidateFuzzerTest method setup.

@BeforeEach
void setup() {
    ServiceCaller serviceCaller = Mockito.mock(ServiceCaller.class);
    TestCaseListener testCaseListener = Mockito.mock(TestCaseListener.class);
    FilesArguments filesArguments = Mockito.mock(FilesArguments.class);
    abugidasCharsInStringFieldsSanitizeValidateFuzzer = new AbugidasCharsInStringFieldsSanitizeValidateFuzzer(serviceCaller, testCaseListener, catsUtil, filesArguments);
    Mockito.when(testCaseListener.isFieldNotADiscriminator(Mockito.anyString())).thenReturn(true);
    Mockito.when(testCaseListener.isFieldNotADiscriminator("pet#type")).thenReturn(false);
}
Also used : FilesArguments(com.endava.cats.args.FilesArguments) ServiceCaller(com.endava.cats.io.ServiceCaller) TestCaseListener(com.endava.cats.report.TestCaseListener) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

ServiceCaller (com.endava.cats.io.ServiceCaller)10 BeforeEach (org.junit.jupiter.api.BeforeEach)10 FilesArguments (com.endava.cats.args.FilesArguments)8 TestCaseListener (com.endava.cats.report.TestCaseListener)7 TestCaseExporter (com.endava.cats.report.TestCaseExporter)3 CatsUtil (com.endava.cats.util.CatsUtil)3 CatsDSLParser (com.endava.cats.dsl.CatsDSLParser)2 CustomFuzzerUtil (com.endava.cats.fuzzer.CustomFuzzerUtil)2