|
@@ -133,16 +133,15 @@ public class ItemParserTest {
|
133
|
133
|
String expected = "name: Milk\t \t seen: 1 times\n" +
|
134
|
134
|
"============= \t \t =============\n" +
|
135
|
135
|
"Price: 3.23\t\t seen: 1 time\n" +
|
136
|
|
- "-------------\t\t -------------\n" +
|
|
136
|
+ "------------- -------------\n" +
|
137
|
137
|
"\n" +
|
138
|
138
|
"name: Bread\t \t seen: 5 times\n" +
|
139
|
139
|
"============= \t \t =============\n" +
|
140
|
140
|
"Price: 3.23\t\t seen: 2 times\n" +
|
141
|
|
- "-------------\t\t -------------\n" +
|
|
141
|
+ "------------- -------------\n" +
|
142
|
142
|
"Price: 2.23\t\t seen: 1 time\n" +
|
143
|
|
- "-------------\t\t -------------\n" +
|
|
143
|
+ "------------- -------------\n" +
|
144
|
144
|
"Price: 1.23\t\t seen: 2 times\n" +
|
145
|
|
- "-------------\t\t -------------\n" +
|
146
|
145
|
"\n" +
|
147
|
146
|
"Errors seen: 0 times";
|
148
|
147
|
String actual = itemParser.formatText(rawMultipleItems2).toString();
|
|
@@ -152,11 +151,10 @@ public class ItemParserTest {
|
152
|
151
|
@Test
|
153
|
152
|
public void formatPriceFieldTest() throws ItemParseException {
|
154
|
153
|
String expected = "Price: 3.23\t\t seen: 2 times\n" +
|
155
|
|
- "-------------\t\t -------------\n" +
|
|
154
|
+ "------------- -------------\n" +
|
156
|
155
|
"Price: 2.23\t\t seen: 1 time\n" +
|
157
|
|
- "-------------\t\t -------------\n" +
|
158
|
|
- "Price: 1.23\t\t seen: 2 times\n" +
|
159
|
|
- "-------------\t\t -------------\n";
|
|
156
|
+ "------------- -------------\n" +
|
|
157
|
+ "Price: 1.23\t\t seen: 2 times\n";
|
160
|
158
|
String actual = itemParser.formatPriceField(rawMultipleItems2, "bread").toString();
|
161
|
159
|
assertEquals(expected, actual);
|
162
|
160
|
}
|