Skip to content

Commit

Permalink
Bump rest-assured version
Browse files Browse the repository at this point in the history
  • Loading branch information
Skaar, Bjørn-Andre committed Dec 18, 2023
1 parent 1e7abd6 commit 3644cf6
Show file tree
Hide file tree
Showing 27 changed files with 84 additions and 69 deletions.
2 changes: 1 addition & 1 deletion klass-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.restassured</groupId>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package no.ssb.klass.api.applicationtest;

import static com.jayway.restassured.RestAssured.*;
import static io.restassured.RestAssured.*;
import static org.hamcrest.Matchers.*;

import no.ssb.klass.testutil.TestDataProvider;
import org.junit.jupiter.api.Test;
import org.springframework.http.HttpStatus;

import com.jayway.restassured.http.ContentType;
import io.restassured.http.ContentType;

/**
* @author Mads Lundemo, SSB.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package no.ssb.klass.api.applicationtest;

import static com.jayway.restassured.RestAssured.*;
import static io.restassured.RestAssured.*;
import static org.hamcrest.Matchers.*;

import org.junit.jupiter.api.Test;
import org.springframework.http.HttpStatus;

import com.jayway.restassured.http.ContentType;
import io.restassured.http.ContentType;

import no.ssb.klass.core.model.ClassificationType;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package no.ssb.klass.api.applicationtest;

import static com.jayway.restassured.RestAssured.*;
import static io.restassured.RestAssured.*;
import static org.hamcrest.Matchers.*;

import no.ssb.klass.testutil.TestDataProvider;
import org.junit.jupiter.api.Test;
import org.springframework.http.HttpStatus;

import com.jayway.restassured.http.ContentType;
import io.restassured.http.ContentType;


/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package no.ssb.klass.api.applicationtest;

import com.jayway.restassured.http.ContentType;
import io.restassured.http.ContentType;
import no.ssb.klass.testutil.TestDataProvider;
import org.junit.jupiter.api.Test;
import org.springframework.http.HttpStatus;

import static com.jayway.restassured.RestAssured.given;
import static io.restassured.RestAssured.given;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;

Expand Down Expand Up @@ -205,7 +205,7 @@ public void restServiceCodesAt2015CSV() {
.statusCode(HttpStatus.OK.value())
.contentType(CONTENT_TYPE_CSV)

.content(containsString(
.body(containsString(
"\"code\",\"parentCode\",\"level\",\"name\",\"shortName\",\"presentationName\",\"validFrom\",\"validTo\",\"notes\"\n"
+ "\"0101\",,\"1\",\"Halden\",\"\",\"\",,,\"\"\n"
+ "\"0104\",,\"1\",\"Moss\",\"\",\"\",,,\"\"\n"
Expand All @@ -225,7 +225,7 @@ public void restServiceCodesAtFutureDateIncludedFutureVersionCSV() {
.statusCode(HttpStatus.OK.value())
.contentType(CONTENT_TYPE_CSV)

.content(containsString(
.body(containsString(
"\"code\",\"parentCode\",\"level\",\"name\",\"shortName\",\"presentationName\",\"validFrom\",\"validTo\",\"notes\"\n"
+ "\"0101\",,\"1\",\"Halden\",\"\",\"\",,,\"\"\n"
+ "\"0104\",,\"1\",\"Moss\",\"\",\"\",,,\"\"\n"
Expand All @@ -250,7 +250,7 @@ public void restServiceCodesAt2012CSV() {
.statusCode(HttpStatus.OK.value())
.contentType(CONTENT_TYPE_CSV)

.content(containsString(
.body(containsString(
"\"code\",\"parentCode\",\"level\",\"name\",\"shortName\",\"presentationName\",\"validFrom\",\"validTo\",\"notes\"\n" + "\"0101\",,\"1\",\"Halden\",\"\",\"\",,,\"\"\n"
+ "\"0104\",,\"1\",\"Moss\",\"\",\"\",,,\"\"\n"
+ "\"0301\",,\"1\",\"Oslo\",\"\",\"\",,,\"\"\n"
Expand All @@ -274,7 +274,7 @@ public void restServiceCodesAtAlternativeCSVSeparator() {
.statusCode(HttpStatus.OK.value())
.contentType(CONTENT_TYPE_CSV)

.content(containsString(
.body(containsString(
"\"code\";\"parentCode\";\"level\";\"name\";\"shortName\";\"presentationName\";\"validFrom\";\"validTo\";\"notes\"\n"
+ "\"0101\";;\"1\";\"Halden\";\"\";\"\";;;\"\"\n"
+ "\"0104\";;\"1\";\"Moss\";\"\";\"\";;;\"\"\n"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package no.ssb.klass.api.applicationtest;

import com.jayway.restassured.http.ContentType;
import io.restassured.http.ContentType;
import no.ssb.klass.testutil.TestDataProvider;
import org.junit.jupiter.api.Test;
import org.springframework.http.HttpStatus;

import static com.jayway.restassured.RestAssured.given;
import static io.restassured.RestAssured.given;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;

Expand Down Expand Up @@ -172,7 +172,7 @@ public void restServiceCodesCSV() {
.statusCode(HttpStatus.OK.value())
.contentType(CONTENT_TYPE_CSV)

.content(containsString(
.body(containsString(
"\"code\",\"parentCode\",\"level\",\"name\",\"shortName\",\"presentationName\","
+ "\"validFrom\",\"validTo\",\"validFromInRequestedRange\",\"validToInRequestedRange\",\"notes\"\n"
+ "\"0101\",,\"1\",\"Halden\",\"\",\"\",,,\"2014-01-01\",\"2015-01-01\",\"\"\n"
Expand All @@ -193,7 +193,7 @@ public void restServiceCodesIncludeFutureVersionCSV() {
.statusCode(HttpStatus.OK.value())
.contentType(CONTENT_TYPE_CSV)

.content(containsString(
.body(containsString(
"\"code\",\"parentCode\",\"level\",\"name\",\"shortName\",\"presentationName\","
+ "\"validFrom\",\"validTo\",\"validFromInRequestedRange\",\"validToInRequestedRange\",\"notes\"\n"
+ "\"0101\",,\"1\",\"Halden\",\"\",\"\",,,\""+TestDataProvider.TEN_YEARS_LATER_DATE+"\",\""+TestDataProvider.FIFTEEN_YEARS_LATER_DATE+"\",\"\"\n"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package no.ssb.klass.api.applicationtest;

import com.jayway.restassured.http.ContentType;
import io.restassured.http.ContentType;
import org.junit.jupiter.api.Test;
import org.springframework.http.HttpStatus;

import static com.jayway.restassured.RestAssured.given;
import static io.restassured.RestAssured.given;
import static org.hamcrest.Matchers.*;

public class RestApiCorrespondenceTablesIntegrationTest extends AbstractRestApiApplicationTest {
Expand Down Expand Up @@ -79,7 +79,7 @@ public void restServiceCorrespondenceTablesCSV() {
.then()
.statusCode(HttpStatus.OK.value())
.contentType(CONTENT_TYPE_CSV)
.content(containsString(
.body(containsString(
"\"sourceCode\";\"sourceName\";\"targetCode\";\"targetName\"\n" +
"\"0301\";\"Oslo\";\"030101\";\"Gamle Oslo\"\n" +
"\"0301\";\"Oslo\";\"030102\";\"Grünerløkka\"\n" +
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package no.ssb.klass.api.applicationtest;

import com.jayway.restassured.http.ContentType;
import io.restassured.http.ContentType;
import no.ssb.klass.testutil.TestDataProvider;
import org.junit.jupiter.api.Test;
import org.springframework.http.HttpStatus;

import static com.jayway.restassured.RestAssured.given;
import static io.restassured.RestAssured.given;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;

Expand Down Expand Up @@ -169,7 +169,7 @@ public void restServiceCorrespondsCSV() {
// .prettyPeek()
.then()
.statusCode(HttpStatus.OK.value())
.content(containsString(
.body(containsString(
"\"sourceCode\",\"sourceName\",\"sourceShortName\",\"targetCode\",\"targetName\",\"targetShortName\"\n"
+ "\"0301\",\"Oslo\",\"\",\"030101\",\"Gamle Oslo\",\"\"\n"
+ "\"0301\",\"Oslo\",\"\",\"030102\",\"Grünerløkka\",\"\"\n"
Expand All @@ -187,7 +187,7 @@ public void restServiceCorrespondsIncludeFutureVersionCSV() {
// .prettyPeek()
.then()
.statusCode(HttpStatus.OK.value())
.content(containsString(
.body(containsString(
"\"sourceCode\",\"sourceName\",\"sourceShortName\",\"targetCode\",\"targetName\",\"targetShortName\"\n"
+ "\"0301\",\"Oslo\",\"\",\"030101\",\"Gamle Oslo\",\"\"\n"
+ "\"0301\",\"Oslo\",\"\",\"030102\",\"Grünerløkka\",\"\"\n"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package no.ssb.klass.api.applicationtest;

import static com.jayway.restassured.RestAssured.*;
import static io.restassured.RestAssured.*;
import static org.hamcrest.Matchers.*;

import no.ssb.klass.testutil.TestDataProvider;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.http.HttpStatus;

import com.jayway.restassured.http.ContentType;
import io.restassured.http.ContentType;

/**
* @author Mads Lundemo, SSB.
Expand Down Expand Up @@ -174,7 +174,7 @@ public void restServiceCorrespondsCSV() {
// .prettyPeek()
.then()
.statusCode(HttpStatus.OK.value())
.content(containsString(
.body(containsString(
"\"sourceCode\",\"sourceName\",\"sourceShortName\",\"targetCode\",\"targetName\","
+ "\"targetShortName\",\"validFrom\",\"validTo\"\n"
+ "\"0301\",\"Oslo\",\"\",\"030101\",\"Gamle Oslo\",\"\",\"2015-01-01\",\n"
Expand All @@ -193,7 +193,7 @@ public void restServiceCorrespondsIncludeFutureVersionCSV() {
// .prettyPeek()
.then()
.statusCode(HttpStatus.OK.value())
.content(containsString(
.body(containsString(
"\"sourceCode\",\"sourceName\",\"sourceShortName\",\"targetCode\",\"targetName\","
+ "\"targetShortName\",\"validFrom\",\"validTo\"\n"
+ "\"0301\",\"Oslo\",\"\",\"030101\",\"Gamle Oslo\",\"\",\"2015-01-01\",\n"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package no.ssb.klass.api.applicationtest;

import static com.jayway.restassured.RestAssured.*;
import static io.restassured.RestAssured.*;
import static org.hamcrest.Matchers.*;

import no.ssb.klass.testutil.TestDataProvider;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.http.HttpStatus;

import com.jayway.restassured.http.ContentType;
import io.restassured.http.ContentType;

import no.ssb.klass.core.model.ClassificationFamily;
import no.ssb.klass.core.model.ClassificationVariant;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package no.ssb.klass.api.applicationtest;

import static com.jayway.restassured.RestAssured.*;
import static io.restassured.RestAssured.*;

import org.junit.jupiter.api.Test;
import org.springframework.http.HttpStatus;

import com.jayway.restassured.http.ContentType;
import io.restassured.http.ContentType;

/**
* @author Mads Lundemo, SSB.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package no.ssb.klass.api.applicationtest;

import static com.jayway.restassured.RestAssured.*;
import static io.restassured.RestAssured.*;
import static org.hamcrest.Matchers.*;

import org.junit.jupiter.api.Test;
import org.springframework.http.HttpStatus;

import com.jayway.restassured.http.ContentType;
import io.restassured.http.ContentType;

import no.ssb.klass.core.model.ClassificationType;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package no.ssb.klass.api.applicationtest;

import static com.jayway.restassured.RestAssured.*;
import static io.restassured.RestAssured.*;
import static org.hamcrest.Matchers.*;

import no.ssb.klass.testutil.TestDataProvider;
import org.junit.jupiter.api.Test;
import org.springframework.http.HttpStatus;

import com.jayway.restassured.http.ContentType;
import io.restassured.http.ContentType;


/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package no.ssb.klass.api.applicationtest;

import static com.jayway.restassured.RestAssured.*;
import static io.restassured.RestAssured.*;
import static org.hamcrest.Matchers.*;

import org.junit.jupiter.api.Test;
import org.springframework.http.HttpStatus;

import com.jayway.restassured.http.ContentType;
import io.restassured.http.ContentType;

/**
* Testsuite that test the list (all) ssb sections
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package no.ssb.klass.api.applicationtest;

import static com.jayway.restassured.RestAssured.*;
import static io.restassured.RestAssured.*;
import static org.hamcrest.Matchers.*;

import no.ssb.klass.testutil.TestDataProvider;
import org.junit.jupiter.api.Test;
import org.springframework.http.HttpStatus;
import org.springframework.test.context.ActiveProfiles;

import com.jayway.restassured.http.ContentType;
import io.restassured.http.ContentType;

import no.ssb.klass.core.config.ConfigurationProfiles;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package no.ssb.klass.api.applicationtest;

import com.jayway.restassured.http.ContentType;
import io.restassured.http.ContentType;
import no.ssb.klass.testutil.TestDataProvider;
import org.junit.jupiter.api.Test;
import org.springframework.http.HttpStatus;

import static com.jayway.restassured.RestAssured.given;
import static io.restassured.RestAssured.given;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;

Expand Down Expand Up @@ -154,7 +154,7 @@ public void restServiceVariantAtCSV() {
.then()
.statusCode(HttpStatus.OK.value())
.contentType(CONTENT_TYPE_CSV)
.content(containsString(
.body(containsString(
"\"code\",\"parentCode\",\"level\",\"name\",\"shortName\",\"presentationName\",\"validFrom\",\"validTo\",\"notes\"\n"
+ "\"A\",,\"1\",\"Enpersonfamilie\",\"\",\"\",,,\"\"\n"
+ "\"A_\",\"A\",\"2\",\"Enpersonfamilie\",\"\",\"\",,,\"\"\n"
Expand All @@ -174,7 +174,7 @@ public void restServiceVariantAtIncludedFutureVersionsCSV() {
.then()
.statusCode(HttpStatus.OK.value())
.contentType(CONTENT_TYPE_CSV)
.content(containsString(
.body(containsString(
"\"code\",\"parentCode\",\"level\",\"name\",\"shortName\",\"presentationName\",\"validFrom\",\"validTo\",\"notes\"\n"
+ "\"C\",,\"1\",\"Enslig person med barn\",\"\",\"\",,,\"\"\n"
+ "\"CA\",\"C\",\"2\",\"Enslig person med barn 0-5 år\",\"\",\"\",,,\"\"\n"
Expand All @@ -194,7 +194,7 @@ public void restServiceVariantAtCSVFullVariantName() {
.then()
.statusCode(HttpStatus.OK.value())
.contentType(CONTENT_TYPE_CSV)
.content(containsString(
.body(containsString(
"\"code\",\"parentCode\",\"level\",\"name\",\"shortName\",\"presentationName\",\"validFrom\",\"validTo\",\"notes\"\n"
+ "\"A\",,\"1\",\"Enpersonfamilie\",\"\",\"\",,,\"\"\n"
+ "\"A_\",\"A\",\"2\",\"Enpersonfamilie\",\"\",\"\",,,\"\"\n"
Expand All @@ -217,7 +217,7 @@ public void restServiceVariantAtCSVFullVariantNameFutureVersion() {
.then()
.statusCode(HttpStatus.OK.value())
.contentType(CONTENT_TYPE_CSV)
.content(containsString(
.body(containsString(
"\"code\",\"parentCode\",\"level\",\"name\",\"shortName\",\"presentationName\",\"validFrom\",\"validTo\",\"notes\"\n"
+ "\"C\",,\"1\",\"Enslig person med barn\",\"\",\"\",,,\"\"\n"
+ "\"CA\",\"C\",\"2\",\"Enslig person med barn 0-5 år\",\"\",\"\",,,\"\"\n"
Expand Down
Loading

0 comments on commit 3644cf6

Please sign in to comment.