Prepare for tests
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package ch.zhaw.gartenverwaltung.io;
|
||||
|
||||
import ch.zhaw.gartenverwaltung.types.Task;
|
||||
import org.junit.jupiter.api.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
public class JsonTaskDatabaseTest {
|
||||
|
||||
TaskDatabase testDatabase;
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("dd.MM.yyyy");
|
||||
@BeforeEach
|
||||
void connectToDb() {
|
||||
// testDatabase = new JsonTaskDatabase();
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
@DisplayName("Check if results are retrieved completely")
|
||||
void getTasks(){
|
||||
/*
|
||||
List<Task> taskList=null;
|
||||
try {
|
||||
taskList = testDatabase.getTaskList(formatter.parse("01.05.2022"), formatter.parse("01.08.2022"));
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
Assertions.assertTrue(taskList.size()>0);
|
||||
*/
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user