Skip to content

Commit

Permalink
修改Codacy/PR Quality Review
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-awesome committed Mar 12, 2020
1 parent 6a0fed5 commit ab54d8a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/java/com/meituan/lyrebird/test/TestFunctional.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ public void testLBMockData() throws LyrebirdClientException {
"{\"code\": 1000,\"data\": {\"id\": \"cfa0c589-8ef0-4885-b4f4-b9688c5af0d5\", \"name\": \"test-data\", \"response\": {\"data\": \"[{\\\"type\\\": \\\"scheme\\\", \\\"info\\\":{\\\"value\\\": \\\"test://www.lyrebird.java.sdk.com\\\"}, \\\"desc\\\": \\\"The scheme of target page\\\"}]\"}}, \"message\": \"success\"}"));

LBMockData lbMockData = this.lyrebird.getMockData("cfa0c589-8ef0-4885-b4f4-b9688c5af0d5");
Assert.assertEquals("cfa0c589-8ef0-4885-b4f4-b9688c5af0d5", lbMockData.getId());
Assert.assertEquals("test-data", lbMockData.getName());
assertEquals("cfa0c589-8ef0-4885-b4f4-b9688c5af0d5", lbMockData.getId());
assertEquals("test-data", lbMockData.getName());

List<String> urlScheme = JsonPath.parse(lbMockData.getResponseData().toString()).read("$[?(@.type == 'scheme')].info.value");
Assert.assertEquals(1, urlScheme.size());
Assert.assertEquals("test://www.lyrebird.java.sdk.com", urlScheme.get(0));
assertEquals(1, urlScheme.size());
assertEquals("test://www.lyrebird.java.sdk.com", urlScheme.get(0));
}
}

0 comments on commit ab54d8a

Please sign in to comment.