Graqr / Threshr

java sdk for target's grocery api
GNU General Public License v3.0
1 stars 2 forks source link

parse httpresponse to java objects #12

Closed Jonathan-Zollinger closed 10 months ago

Jonathan-Zollinger commented 11 months ago

Summary

right now the response is just a Publisher object

Proposed Solution

do what must be done to parse the response to a java object

Alternative

save the object to a json file - not a great alternative imo

Additional Context

No response

Code of Conduct

Requirements

Proposed Test

(this is definitely not written perfectly)

@Test
void testFetchProducts() {
    tcins = new long[]{82691535, 82642843, 85813668};
    Products[] products = tarvesterClient.fetchProducts(targetStore.toString(), "&tcins="
            + Arrays.stream(tcins)
            .mapToObj(String::valueOf)
            .collect(Collectors.joining("%2C")));
    AssertEquals(3, products.size());
}
Jonathan-Zollinger commented 11 months ago

just needs a test - adding QA tag