Skip to content

Commit 65bfe09

Browse files
Egor MartsynkovskyiText-CI
authored andcommitted
Unify test logic
DEVSIX-6440 Autoported commit. Original commit hash: [e3c011fd2]
1 parent 248b08b commit 65bfe09

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

itext.tests/itext.styledxmlparser.tests/itext/styledxmlparser/jsoup/nodes/NodeTest.cs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,12 @@ public virtual void UnwrapNoChildren() {
248248
public virtual void Traverse() {
249249
Document doc = iText.StyledXmlParser.Jsoup.Jsoup.Parse("<div><p>Hello</p></div><div>There</div>");
250250
StringBuilder accum = new StringBuilder();
251-
doc.Select("div").First().Traverse(new _NodeVisitor_260(accum));
251+
doc.Select("div").First().Traverse(new _NodeVisitor_273(accum));
252252
NUnit.Framework.Assert.AreEqual("<div><p><#text></#text></p></div>", accum.ToString());
253253
}
254254

255-
private sealed class _NodeVisitor_260 : NodeVisitor {
256-
public _NodeVisitor_260(StringBuilder accum) {
255+
private sealed class _NodeVisitor_273 : NodeVisitor {
256+
public _NodeVisitor_273(StringBuilder accum) {
257257
this.accum = accum;
258258
}
259259

@@ -350,5 +350,19 @@ private Attributes SingletonAttributes() {
350350
attributes.Put("value", "bar");
351351
return attributes;
352352
}
353+
354+
private static String CreateAnotherValidUrlVersion(String url) {
355+
if (url.StartsWith("file:///")) {
356+
return "file:/" + url.Substring("file:///".Length);
357+
}
358+
else {
359+
if (url.StartsWith("file:/")) {
360+
return "file:///" + url.Substring("file:/".Length);
361+
}
362+
else {
363+
return url;
364+
}
365+
}
366+
}
353367
}
354368
}

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c5c3c19e8a28347e933a571ceca3dc2c711f5624
1+
e3c011fd25e9c5f3ff579483db29f81f760c4c1e

0 commit comments

Comments
 (0)