diff --git a/src/main/java/github/weichware10/util/SpeicherUtilities.java b/src/main/java/github/weichware10/util/SpeicherUtilities.java deleted file mode 100644 index aa92948..0000000 --- a/src/main/java/github/weichware10/util/SpeicherUtilities.java +++ /dev/null @@ -1,77 +0,0 @@ -package github.weichware10.util; - -import github.weichware10.util.Enums.ToolType; -import github.weichware10.util.data.TrialData; - -/** - * Operations for the TrialData. - */ -public class SpeicherUtilities { - private String location; - - /** - * Creates SpeicherUtilities with Data Location. - * - * @param location - the Location where the Data is stored - */ - public SpeicherUtilities(String location) { - this.location = location; - } - - /** - * Returns the Data Location. - * - * @return location - */ - public String getLocation() { - return location; - } - - /** - * Sets the Data Location. - * - * @param location - the Location where the Data should get stored - * @return returns true if setLocation was sucessfull - */ - public boolean setLocation(String location) { - this.location = location; - if (this.location == null) { - return false; - } - return true; - } - - /** - * Function to delete the specific Data. - * TODO: Richtiges Löschen implementieren - * - * @param inputString - Data to delete - * @return returns true if deletion was sucessfull - */ - public boolean deleteData(String inputString) { - return true; - } - - /** - * Function to search for specific Data from a function. - * TODO: Richtige Suche implementieren - * - * @param trialId - Data to search - * @return returns the requested Data - */ - public TrialData searchData(String trialId) { - TrialData test = new TrialData(ToolType.ZOOMMAPS, "1", "1"); - return test; - } - - /** - * Function to save the Information from the functions. - * TODO: Richtiges Speichern implementieren - * - * @param inputData - The Data to save - * @return return true if the save was sucessfull - */ - public boolean saveData(TrialData inputData) { - return true; - } -} diff --git a/src/test/java/github/weichware10/util/SpeicherUtilitiesTest.java b/src/test/java/github/weichware10/util/SpeicherUtilitiesTest.java deleted file mode 100644 index 6515ef6..0000000 --- a/src/test/java/github/weichware10/util/SpeicherUtilitiesTest.java +++ /dev/null @@ -1,74 +0,0 @@ -package github.weichware10.util; - -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.Assert.assertEquals; - -import github.weichware10.util.Enums.ToolType; -import github.weichware10.util.data.TrialData; -import org.junit.Test; - - - - -/** - * Unit Test für Speicherutilities. - */ -public class SpeicherUtilitiesTest { - /** - * Test if the Location is set correctly. - */ - @Test - public void locationShouldBeSetCorrectly() { - SpeicherUtilities instance = new SpeicherUtilities("C/Documents"); - assertEquals("C/Documents", instance.getLocation()); - } - - /** - * Test if the Location is returned correctly. - */ - @Test - public void gotLocationCorrect() { - SpeicherUtilities instance = new SpeicherUtilities("C/Documents"); - assertEquals("C/Documents", instance.getLocation()); - } - - /** - * Test if the Location is changed correctly. - */ - @Test - public void locationShouldBeChangedCorrectly() { - SpeicherUtilities instance = new SpeicherUtilities("C/Documents"); - instance.setLocation("C/Music"); - assertEquals("C/Music", instance.getLocation()); - } - - /** - * Test if the deletion was successfull. - */ - @Test - public void deletionWasSuccessfull() { - SpeicherUtilities instance = new SpeicherUtilities("C/Documents"); - assertEquals(true, instance.deleteData("Versuch1 Eyetracking")); - } - - /** - * Test if the search was successfull. - */ - @Test - public void searchWasSuccessfull() { - SpeicherUtilities instance = new SpeicherUtilities("C/Documents"); - assertThat("Datentyp sollte Data sein", instance.searchData("Versuch1 ZoomMaps"), - instanceOf(TrialData.class)); - } - - /** - * Test if the save was successfull. - */ - @Test - public void saveWasSuccessfull() { - SpeicherUtilities instance = new SpeicherUtilities("C/Documents"); - TrialData versuch2ZoomMaps = new TrialData(ToolType.ZOOMMAPS, "2", "1"); - assertEquals(true, instance.saveData(versuch2ZoomMaps)); - } -}