Skip to content

Commit 3cd9e0f

Browse files
authored
Test for Formatter, exactly string format
1 parent 059965c commit 3cd9e0f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.google.hashcode.utils;
2+
3+
import com.google.hashcode.entity.Cell;
4+
import com.google.hashcode.entity.Ingredient;
5+
import org.junit.*;
6+
import static org.junit.Assert.*;
7+
8+
9+
public class FormatterTest {
10+
private Formatter outFormatter = new Formatter();
11+
12+
@Test
13+
public void testOutputForOneSlice(){
14+
String out = outFormatter.getCoordsLineForSlice(new Cell(0, 0, Ingredient.MUSHROOM), new Cell(1,1, Ingredient.MUSHROOM));
15+
assertEquals("0 0 1 1", out);
16+
}
17+
18+
}

0 commit comments

Comments
 (0)