Skip to content

Commit

Permalink
SpotlessApply
Browse files Browse the repository at this point in the history
  • Loading branch information
000panther committed Sep 14, 2023
1 parent 10dd8bb commit b2e8e05
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -37,7 +36,8 @@ void setUp() throws IOException {
@Test
void getCarInformationLevel1_ExpectParamInjected() throws IOException {
// Act
final Map<String, String> params = Collections.singletonMap("id", "1 UNION SELECT * FROM cars;");
final Map<String, String> params =
Collections.singletonMap("id", "1 UNION SELECT * FROM cars;");
unionBasedSQLInjectionVulnerability.getCarInformationLevel1(params);

// Assert
Expand All @@ -50,7 +50,8 @@ void getCarInformationLevel1_ExpectParamInjected() throws IOException {
@Test
void getCarInformationLevel2_ExpectParamInjected() throws IOException {
// Act
final Map<String, String> params = Collections.singletonMap("id", "1' UNION SELECT * FROM cars; --");
final Map<String, String> params =
Collections.singletonMap("id", "1' UNION SELECT * FROM cars; --");
unionBasedSQLInjectionVulnerability.getCarInformationLevel2(params);

// Assert
Expand All @@ -63,7 +64,8 @@ void getCarInformationLevel2_ExpectParamInjected() throws IOException {
@Test
void getCarInformationLevel3_ExpectParamEscaped() throws IOException {
// Act
final Map<String, String> params = Collections.singletonMap("id", "1' UNION SELECT * FROM cars; --");
final Map<String, String> params =
Collections.singletonMap("id", "1' UNION SELECT * FROM cars; --");
unionBasedSQLInjectionVulnerability.getCarInformationLevel3(params);

// Assert
Expand All @@ -87,7 +89,8 @@ void getCarInformationLevel4_ExpecParamEscaped() throws IOException {
unionBasedSQLInjectionVulnerability = new UnionBasedSQLInjectionVulnerability(template);

// Act
final Map<String, String> params = Collections.singletonMap("id", "1' UNION SELECT * FROM cars; --");
final Map<String, String> params =
Collections.singletonMap("id", "1' UNION SELECT * FROM cars; --");
unionBasedSQLInjectionVulnerability.getCarInformationLevel4(params);

// Assert
Expand Down

0 comments on commit b2e8e05

Please sign in to comment.