Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some unit test failed #3337

Merged
merged 2 commits into from
Jan 27, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public void test1() {
});

String kv = tKv.rendering();
assertThat(kv, containsString("ABCDEFGHIJ\n"));
assertThat(kv, containsString("KLMNOPQRST\n"));
assertThat(kv, containsString("UVWXYZ\n"));
assertThat(kv, containsString("ABCDEFGHIJ" + System.lineSeparator()));
assertThat(kv, containsString("KLMNOPQRST" + System.lineSeparator()));
assertThat(kv, containsString("UVWXYZ" + System.lineSeparator()));

tTable.addRow("OPTIONS", kv);
String table = tTable.rendering();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public void testRendering() throws Exception {
ladder.addItem("3");
ladder.addItem("4");
String result = ladder.rendering();
String expected = "1\n" +
" `-2\n" +
" `-3\n" +
" `-4\n";
String expected = "1" + System.lineSeparator() +
" `-2" + System.lineSeparator() +
" `-3" + System.lineSeparator() +
" `-4" + System.lineSeparator();
assertThat(result, equalTo(expected));
System.out.println(result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ public void test1() throws Exception {
table.addRow(1, "one", "uno", "un");
table.addRow(2, "two", "dos", "deux");
String result = table.rendering();
String expected = "+-+---+---+----+\n" +
"|1|one|uno|un |\n" +
"+-+---+---+----+\n" +
"|2|two|dos|deux|\n" +
"+-+---+---+----+\n";
String expected = "+-+---+---+----+" + System.lineSeparator() +
"|1|one|uno|un |" + System.lineSeparator() +
"+-+---+---+----+" + System.lineSeparator() +
"|2|two|dos|deux|" + System.lineSeparator() +
"+-+---+---+----+" + System.lineSeparator();
assertThat(result, equalTo(expected));
System.out.println(result);
}
Expand All @@ -46,9 +46,9 @@ public void test2() throws Exception {
});
table.addRow(1, "abcde", "ABCDE");
String result = table.rendering();
String expected = "+-+----------+----------+\n" +
"|1| abcde | ABCDE|\n" +
"+-+----------+----------+\n";
String expected = "+-+----------+----------+" + System.lineSeparator() +
"|1| abcde | ABCDE|" + System.lineSeparator() +
"+-+----------+----------+" + System.lineSeparator();
assertThat(result, equalTo(expected));
System.out.println(result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void testDubboProtocolWithMina() throws Exception {
System.out.println(service.stringLength(buf.toString()));

// cast to EchoService
EchoService echo = proxy.getProxy(protocol.refer(EchoService.class, URL.valueOf("dubbo://127.0.0.1:9011/" + DemoService.class.getName() + "?client=mina").addParameter("timeout", 3000l)));
EchoService echo = (EchoService) service;
ralf0131 marked this conversation as resolved.
Show resolved Hide resolved
for (int i = 0; i < 10; i++) {
assertEquals(echo.$echo(buf.toString()), buf.toString());
assertEquals(echo.$echo("test"), "test");
Expand Down