drugi test Write
This commit is contained in:
parent
8e5fccf85d
commit
27e0d13ab6
|
@ -8,6 +8,7 @@ import java.time.format.DateTimeFormatter;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class WriteTest {
|
||||
|
@ -27,7 +28,7 @@ public class WriteTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void writeTest() {
|
||||
public void writeTestPass() {
|
||||
List<String> person = new ArrayList<String>();
|
||||
person.add("Gniezno");
|
||||
person.add("Jan");
|
||||
|
@ -36,4 +37,17 @@ public class WriteTest {
|
|||
|
||||
assertTrue(Write.write(file, person));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void writeTestFail() {
|
||||
List<String> person = new ArrayList<String>();
|
||||
person.add("Gniezno");
|
||||
person.add("Jan");
|
||||
person.add("Kowalski");
|
||||
person.add("89042836312");
|
||||
|
||||
file.delete();
|
||||
|
||||
assertFalse(Write.write(file, person));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue