Search in sources :

Example 6 with ServiceCaller

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

the class AbugidasCharsInStringFieldsValidateSanitizeFuzzerTest method setup.

@BeforeEach
void setup() {
    ServiceCaller serviceCaller = Mockito.mock(ServiceCaller.class);
    TestCaseListener testCaseListener = Mockito.mock(TestCaseListener.class);
    FilesArguments filesArguments = Mockito.mock(FilesArguments.class);
    abugidasCharsInStringFieldsValidateSanitizeFuzzer = new AbugidasCharsInStringFieldsValidateSanitizeFuzzer(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)

Example 7 with ServiceCaller

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

the class BypassAuthenticationFuzzerTest method setup.

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

Example 8 with ServiceCaller

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

the class WithinControlCharsInFieldsSanitizeValidateFuzzerTest method setup.

@BeforeEach
void setup() {
    ServiceCaller serviceCaller = Mockito.mock(ServiceCaller.class);
    TestCaseListener testCaseListener = Mockito.mock(TestCaseListener.class);
    FilesArguments filesArguments = Mockito.mock(FilesArguments.class);
    withinControlCharsInFieldsSanitizeValidateFuzzer = new WithinControlCharsInFieldsSanitizeValidateFuzzer(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)

Example 9 with ServiceCaller

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

the class ZalgoTextInStringFieldsValidateSanitizeFuzzerTest method setup.

@BeforeEach
void setup() {
    ServiceCaller serviceCaller = Mockito.mock(ServiceCaller.class);
    TestCaseListener testCaseListener = Mockito.mock(TestCaseListener.class);
    FilesArguments filesArguments = Mockito.mock(FilesArguments.class);
    zalgoTextInStringFieldsValidateSanitizeFuzzer = new ZalgoTextInStringFieldsValidateSanitizeFuzzer(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)

Example 10 with ServiceCaller

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

the class ZalgoTextInStringFieldsSanitizeValidateFuzzerTest method setup.

@BeforeEach
void setup() {
    ServiceCaller serviceCaller = Mockito.mock(ServiceCaller.class);
    TestCaseListener testCaseListener = Mockito.mock(TestCaseListener.class);
    FilesArguments filesArguments = Mockito.mock(FilesArguments.class);
    zalgoTextInStringFieldsSanitizeValidateFuzzer = new ZalgoTextInStringFieldsSanitizeValidateFuzzer(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