Added NotImplementedException, edited some DatabaseGoodCasesTest tests.

This commit is contained in:
Riley Schneider
2025-12-03 20:52:47 +01:00
parent 8150fdbf13
commit b801ea7d21
5 changed files with 26 additions and 25 deletions

View File

@@ -1,10 +1,12 @@
package hhn.temp.project.provider;
import jdk.jshell.spi.ExecutionControl;
import java.util.Collection;
public interface DatabaseManager<E> extends Database {
public void saveObjects(Collection<E> objects);
public Collection<E> getObjects();
public void saveObject(E object);
public E getObject(int id);
public Collection<E> getObjects() throws ExecutionControl.NotImplementedException;
public void saveObject(E object) throws ExecutionControl.NotImplementedException;
public E getObject(int id) throws ExecutionControl.NotImplementedException;
}

View File

@@ -1,5 +1,7 @@
package hhn.temp.project.provider;
import jdk.jshell.spi.ExecutionControl;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
@@ -20,18 +22,18 @@ public class SimpleDatabaseManager<E> implements DatabaseManager<E> {
}
@Override
public Collection<E> getObjects() {
return List.of();
public Collection<E> getObjects() throws ExecutionControl.NotImplementedException {
throw new ExecutionControl.NotImplementedException("Not Implemented!");
}
@Override
public void saveObject(E object) {
g
public void saveObject(E object) throws ExecutionControl.NotImplementedException {
throw new ExecutionControl.NotImplementedException("Not Implemented!");
}
@Override
public E getObject(int id) {
return null;
public E getObject(int id) throws ExecutionControl.NotImplementedException {
throw new ExecutionControl.NotImplementedException("Not Implemented!");
}
@Override