Notes
Notes - notes.io |
29 Steps (1 failed, 28 passed)
3m38,061s
java.net.SocketTimeoutException: timeout
at okio.SocketAsyncTimeout.newTimeoutException(JvmOkio.kt:146)
at okio.AsyncTimeout.access$newTimeoutException(AsyncTimeout.kt:186)
at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:390)
at okio.RealBufferedSource.indexOf(RealBufferedSource.kt:430)
And ElasticSearch.DzQueryResponse.Sprawdz sprawdz czy pobrana wartosc z DzQryResp dla nr PESEL: "PESEL_1" jest rowna nr dowodu: "nr_dowodu"
@Then("ElasticSearch.DzQueryResponse.Sprawdz sprawdz czy pobrana wartosc z DzQryResp dla nr PESEL: {string} jest rowna nr dowodu: {string}")
public void checkNoDzQueryResponse(String pesel, String iDNumber) throws Exception {
pesel = dataContext.getDataFromContextOrGetInsertedData(pesel);
String expectedIDNumber = dataContext.getDataFromContextOrGetInsertedData(iDNumber);
String iDNumberdzQryResp = elasticSearchPage.getClientIdCardFromMIGDZResponse(pesel);
Assert.assertEquals(iDNumberdzQryResp, expectedIDNumber, "Pobrana wartość z MigdzResponse nie jest równa numerowi dowodu klienta");
}
public String getClientIdCardFromMIGDZResponse(String pesel) throws Exception {
String matchPhrase1 = "DzQryResp";
String matchPhrase2 = "nrDokDo";
String requestBody = new QueryRequestBuilder(pesel)
.addMessage(pesel)
.addMessage(matchPhrase1)
.getRequestBody();
String response = getElasticResponse(requestBody);
String message = getMessages(response).get(0);
String message2 = getValuesBetweenTags(message, matchPhrase1).get(0);
return getValuesBetweenTags(message2, matchPhrase2).get(0);
}
public static List<String> getValuesBetweenTags(String inputXmlFragment, String rawTag) {
String tag = rawTag.split("\s+")[0].replace("/", "");
if (inputXmlFragment.contains("<" + tag + "><" + tag + ">")) {
inputXmlFragment = inputXmlFragment.replace("<" + tag + "><" + tag + ">", "<" + tag + "Grp><" + tag + ">");
String target = "</" + tag + ">";
int firstIndex = inputXmlFragment.indexOf(target);
int secondIndex = inputXmlFragment.indexOf(target, firstIndex + 1);
inputXmlFragment = inputXmlFragment.substring(0, secondIndex)
+ "</" + tag + "Grp>"
+ inputXmlFragment.substring(secondIndex + target.length());
tag = tag + "Grp";
}
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team
