Skip to content

Commit 082be35

Browse files
Fixing UT
1 parent 5226471 commit 082be35

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

code/optimize/src/test/java/com/adobe/marketing/mobile/optimize/OfferTests.java

+9-5
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,15 @@ public void testFromEventData_validArrayOffer() throws Exception {
299299
Assert.assertEquals(OfferType.JSON, offer.getType());
300300
Assert.assertEquals(1, offer.getLanguage().size());
301301
Assert.assertEquals("en-us", offer.getLanguage().get(0));
302-
Assert.assertEquals("{\n" +
303-
"\"name\":\"John\",\n" +
304-
"\"age\":30,\n" +
305-
"\"cars\":[\"Ford\", \"BMW\", \"Fiat\"]\n" +
306-
"}", offer.getContent());
302+
Assert.assertEquals("[{\n" +
303+
" \"name\": \"John\",\n" +
304+
" \"age\": 30,\n" +
305+
" \"cars\": [\n" +
306+
" \"Ford\",\n" +
307+
" \"BMW\",\n" +
308+
" \"Fiat\"\n" +
309+
" ]\n" +
310+
"}]", offer.getContent());
307311
Assert.assertEquals(1, offer.getCharacteristics().size());
308312
Assert.assertEquals("true", offer.getCharacteristics().get("mobile"));
309313
}

code/optimize/src/test/resources/json/OFFER_VALID_LIST.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"data": {
66
"id": "xcore:personalized-offer:1111111111111111",
77
"format": "application/json",
8-
"content": "{\n\"name\":\"John\",\n\"age\":30,\n\"cars\":[\"Ford\", \"BMW\", \"Fiat\"]\n}",
8+
"content": "[{\n \"name\": \"John\",\n \"age\": 30,\n \"cars\": [\n \"Ford\",\n \"BMW\",\n \"Fiat\"\n ]\n}]",
99
"language": [
1010
"en-us"
1111
],

0 commit comments

Comments
 (0)