-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Luke Sikina
committed
Oct 14, 2023
1 parent
6f0c33e
commit 1518d59
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
pic-sure-api-war/src/test/java/edu/harvard/dbmi/avillach/PicsureRSTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package edu.harvard.dbmi.avillach; | ||
|
||
import edu.harvard.dbmi.avillach.domain.QueryRequest; | ||
import junit.framework.TestCase; | ||
import org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider; | ||
import org.junit.Test; | ||
|
||
import javax.ws.rs.core.MediaType; | ||
import javax.ws.rs.core.MultivaluedHashMap; | ||
import java.io.ByteArrayInputStream; | ||
import java.io.IOException; | ||
import java.lang.annotation.Annotation; | ||
import java.util.HashMap; | ||
|
||
public class PicsureRSTest { | ||
|
||
@Test | ||
public void asdf() throws IOException { | ||
ResteasyJackson2Provider p = new ResteasyJackson2Provider(); | ||
String json = "{\"resourceUUID\":\"de273216-3b46-4dec-a330-1aa0634624ae\",\"query\":{\"categoryFilters\":{},\"numericFilters\":{},\"requiredFields\":[],\"anyRecordOf\":[],\"variantInfoFilters\":[{\"categoryVariantInfoFilters\":{},\"numericVariantInfoFilters\":{}}],\"expectedResultType\":\"COUNT\"}"; | ||
Class<?> queryRequestClass = QueryRequest.class; | ||
Object o = p.readFrom((Class<Object>) queryRequestClass, QueryRequest.class, new Annotation[]{}, MediaType.APPLICATION_JSON_TYPE, new MultivaluedHashMap<>(), new ByteArrayInputStream(json.getBytes())); | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters