Skip to content

Commit

Permalink
chore: Add unit tests to check skipped http methods
Browse files Browse the repository at this point in the history
  • Loading branch information
en-milie committed Jun 8, 2024
1 parent db5a4a7 commit d884a69
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.Map;

@QuarkusTest
class ZalgoTextInStringFieldsValidateSanitizeFuzzerTest {
class ZalgoTextInFieldsValidateSanitizeFuzzerTest {
private ZalgoTextInFieldsValidateSanitizeFuzzer zalgoTextInStringFieldsValidateSanitizeFuzzer;

@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.endava.cats.fuzzer.fields;

import com.endava.cats.http.HttpMethod;
import com.endava.cats.http.ResponseCodeFamilyPredefined;
import com.endava.cats.io.ServiceCaller;
import com.endava.cats.model.CatsResponse;
Expand Down Expand Up @@ -79,4 +80,9 @@ void shouldRunWhenFieldsPresent() {
Mockito.verify(testCaseListener, Mockito.times(18)).reportResult(Mockito.any(), Mockito.any(),
Mockito.any(), Mockito.eq(ResponseCodeFamilyPredefined.FOURXX));
}

@Test
void shouldSkipForHttpMethods() {
Assertions.assertThat(zeroWidthCharsInNamesFieldsFuzzer.skipForHttpMethods()).containsOnly(HttpMethod.GET, HttpMethod.DELETE, HttpMethod.HEAD, HttpMethod.TRACE);
}
}

0 comments on commit d884a69

Please sign in to comment.