Skip to content

Commit

Permalink
add adapters to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabethhealy committed Nov 20, 2024
1 parent 9b3ca82 commit 1a2d59a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sdk/src/test/java/io/opentdf/platform/sdk/ManifestTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import io.opentdf.platform.sdk.Manifest.ManifestDeserializer;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.List;
Expand Down Expand Up @@ -63,7 +65,9 @@ void testManifestMarshalAndUnMarshal() {
"}";

GsonBuilder gsonBuilder = new GsonBuilder();
Gson gson = gsonBuilder.setPrettyPrinting().create();
Gson gson = gsonBuilder.setPrettyPrinting()
.registerTypeAdapter(Manifest.class, new ManifestDeserializer())
.create();
Manifest manifest = gson.fromJson(kManifestJsonFromTDF, Manifest.class);

// Test payload
Expand Down Expand Up @@ -143,7 +147,9 @@ void testAssertionNull() {
"}";

GsonBuilder gsonBuilder = new GsonBuilder();
Gson gson = gsonBuilder.setPrettyPrinting().create();
Gson gson = gsonBuilder.setPrettyPrinting()
.registerTypeAdapter(Manifest.class, new ManifestDeserializer())
.create();
Manifest manifest = gson.fromJson(kManifestJsonFromTDF, Manifest.class);

// Test payload for sanity check
Expand Down

0 comments on commit 1a2d59a

Please sign in to comment.