Skip to content

Commit

Permalink
#47 comments on review
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Paderin committed Jan 26, 2015
1 parent 38b9cf9 commit ea0fc79
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/test/java/com/jcabi/xml/XSLDocumentTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
import com.jcabi.aspects.Parallel;
import com.jcabi.aspects.Tv;
import com.jcabi.matchers.XhtmlMatchers;
import java.io.BufferedWriter;
import java.io.StringWriter;
import org.apache.commons.lang3.StringUtils;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
Expand Down Expand Up @@ -141,20 +139,19 @@ public void transformsIntoText() throws Exception {
*/
@Test
public void stripsXml() throws Exception {
final StringWriter out = new StringWriter();
final BufferedWriter writer = new BufferedWriter(out);
writer.write("<a>");
writer.newLine();
writer.write("<b/>");
writer.newLine();
writer.write("</a>");
writer.close();
final String actual = out.getBuffer().toString();
MatcherAssert.assertThat(
XSLDocument.STRIP.transform(
new XMLDocument("<a> <b/> </a>")
).toString(),
Matchers.containsString(actual)
Matchers.containsString(
new StringBuilder()
.append("<a>")
.append(System.lineSeparator())
.append("<b/>")
.append(System.lineSeparator())
.append("</a>")
.toString()
)
);
}

Expand Down

0 comments on commit ea0fc79

Please sign in to comment.