Permalink
Browse files

Removed headers from test tables so we don't give the impression that…

… they are needed.
  • Loading branch information...
1 parent 36159a1 commit 27e902cb73c53d630e6807708693712d7e483527 @aslakhellesoy aslakhellesoy committed with DFUK Aug 31, 2011
Showing with 16 additions and 21 deletions.
  1. +16 −21 core/src/test/java/cucumber/table/TableDifferTest.java
@@ -10,7 +10,6 @@
private Table table() {
String source =
- "| name | email | credits |" + EOL +
"| Aslak | aslak@email.com | 123 |" + EOL +
"| Joe | joe@email.com | 234 |" + EOL +
"| Bryan | bryan@email.org | 456 |" + EOL +
@@ -20,7 +19,6 @@ private Table table() {
private Table otherTableWithDeletedAndInserted() {
String source =
- "| name | email | credits |" + EOL +
"| Aslak | aslak@email.com | 123 |" + EOL +
"| Doe | joe@email.com | 234 |" + EOL +
"| Foo | schnickens@email.net | 789 |" + EOL +
@@ -30,13 +28,12 @@ private Table otherTableWithDeletedAndInserted() {
private Table otherTableWithInsertedAtEnd() {
String source =
- "| name | email | credits |" + EOL +
- "| Aslak | aslak@email.com | 123 |" + EOL +
- "| Joe | joe@email.com | 234 |" + EOL +
- "| Bryan | bryan@email.org | 456 |" + EOL +
- "| Ni | ni@email.com | 654 |" + EOL +
- "| Doe | joe@email.com | 234 |" + EOL +
- "| Foo | schnickens@email.net | 789 |" + EOL;
+ "| Aslak | aslak@email.com | 123 |" + EOL +
+ "| Joe | joe@email.com | 234 |" + EOL +
+ "| Bryan | bryan@email.org | 456 |" + EOL +
+ "| Ni | ni@email.com | 654 |" + EOL +
+ "| Doe | joe@email.com | 234 |" + EOL +
+ "| Foo | schnickens@email.net | 789 |" + EOL;
return TableParser.parse(source);
}
@@ -46,12 +43,11 @@ public void shouldFindDifferences() {
new TableDiffer(table(), otherTableWithDeletedAndInserted()).calculateDiffs();
} catch (TableDiffException e) {
String expected =
- " | name | email | credits |" + EOL +
- " - | Joe | joe@email.com | 234 |" + EOL +
- " + | Doe | joe@email.com | 234 |" + EOL +
- " + | Foo | schnickens@email.net | 789 |" + EOL +
- " | Joe | joe@email.com | 234 |" + EOL +
- " - | Ni | ni@email.com | 654 |" + EOL;
+ " - | Joe | joe@email.com | 234 |" + EOL +
+ " + | Doe | joe@email.com | 234 |" + EOL +
+ " + | Foo | schnickens@email.net | 789 |" + EOL +
+ " | Joe | joe@email.com | 234 |" + EOL +
+ " - | Ni | ni@email.com | 654 |" + EOL;
assertEquals(expected, pretty(e.getDiffTable()));
throw e;
}
@@ -63,12 +59,11 @@ public void shouldFindNewLinesAtEnd() {
new TableDiffer(table(), otherTableWithInsertedAtEnd()).calculateDiffs();
} catch (TableDiffException e) {
String expected =
- " | name | email | credits |" + EOL +
- " | Aslak | aslak@email.com | 123 |" + EOL +
- " | Joe | joe@email.com | 234 |" + EOL +
- " | Bryan | bryan@email.org | 456 |" + EOL +
- " + | Doe | joe@email.com | 234 |" + EOL +
- " + | Foo | schnickens@email.net | 789 |" + EOL;
+ " | Aslak | aslak@email.com | 123 |" + EOL +
+ " | Joe | joe@email.com | 234 |" + EOL +
+ " | Bryan | bryan@email.org | 456 |" + EOL +
+ " + | Doe | joe@email.com | 234 |" + EOL +
+ " + | Foo | schnickens@email.net | 789 |" + EOL;
assertEquals(expected, pretty(e.getDiffTable()));
throw e;
}

0 comments on commit 27e902c

Please sign in to comment.