diff --git a/Core/nbproject/project.xml b/Core/nbproject/project.xml index 25e17dd3eb..07b6d666f8 100755 --- a/Core/nbproject/project.xml +++ b/Core/nbproject/project.xml @@ -244,6 +244,46 @@ org.netbeans.libs.junit4 + + org.netbeans.modules.jellytools.java + + + + org.netbeans.modules.jellytools.platform + + + + org.netbeans.modules.jemmy + + + + org.netbeans.modules.nbjunit + + + + + qa-functional + + org.netbeans.libs.junit4 + + + + org.netbeans.modules.jellytools.java + + + + org.netbeans.modules.jellytools.platform + + + + org.netbeans.modules.jemmy + + + + org.netbeans.modules.nbjunit + + + diff --git a/Core/test/qa-functional/src/org/sleuthkit/autopsy/ingest/IngestFileFiltersTest.java b/Core/test/qa-functional/src/org/sleuthkit/autopsy/ingest/IngestFileFiltersTest.java new file mode 100755 index 0000000000..bc74a6f653 --- /dev/null +++ b/Core/test/qa-functional/src/org/sleuthkit/autopsy/ingest/IngestFileFiltersTest.java @@ -0,0 +1,73 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2011-2017 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.sleuthkit.autopsy.ingest; + +import static junit.framework.Assert.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; +import junit.framework.TestCase; +import org.netbeans.junit.NbModuleSuite; +import org.sleuthkit.autopsy.casemodule.Case; +import org.sleuthkit.autopsy.casemodule.CaseActionException; +import org.sleuthkit.autopsy.casemodule.CaseDetails; +import junit.framework.Test; +import org.apache.commons.io.FileUtils; +import org.openide.util.Exceptions; + +public class IngestFileFiltersTest extends TestCase { + + private static final Path caseDirectoryPath = Paths.get(System.getProperty("java.io.tmpdir"), "IngestFileFiltersTest"); + private static final File CASE_DIR = new File(caseDirectoryPath.toString()); + + public static Test suite() { + NbModuleSuite.Configuration conf = NbModuleSuite.createConfiguration(IngestFileFiltersTest.class). + clusters(".*"). + enableModules(".*"); + return conf.suite(); + } + + @Override + public void setUp() { + try { + Case.createAsCurrentCase(Case.CaseType.SINGLE_USER_CASE, caseDirectoryPath.toString(), new CaseDetails("IngestFiltersTest")); + } catch (CaseActionException ex) { + Exceptions.printStackTrace(ex); + } + assertTrue(CASE_DIR.exists()); + } + + @Override + public void tearDown() { + try { + Case.closeCurrentCase(); + FileUtils.deleteDirectory(CASE_DIR); + + } catch (CaseActionException | IOException ex) { + Exceptions.printStackTrace(ex); + } + assertFalse(CASE_DIR.exists()); + } + + public void testFilter() { + System.out.println("testFilter"); + } +} diff --git a/Core/test/unit/src/org/sleuthkit/autopsy/testutils/UnitTestDspCallback.java b/Core/test/qa-functional/src/org/sleuthkit/autopsy/testutils/FunctionalTestDspCallback.java similarity index 97% rename from Core/test/unit/src/org/sleuthkit/autopsy/testutils/UnitTestDspCallback.java rename to Core/test/qa-functional/src/org/sleuthkit/autopsy/testutils/FunctionalTestDspCallback.java index c6adb1f24c..cfa9f3dc59 100755 --- a/Core/test/unit/src/org/sleuthkit/autopsy/testutils/UnitTestDspCallback.java +++ b/Core/test/qa-functional/src/org/sleuthkit/autopsy/testutils/FunctionalTestDspCallback.java @@ -31,7 +31,7 @@ import org.sleuthkit.datamodel.Content; * thread. */ @Immutable -public class UnitTestDspCallback extends DataSourceProcessorCallback { +public class FunctionalTestDspCallback extends DataSourceProcessorCallback { private final Object monitor; private final List errorMessages = new ArrayList<>(); @@ -46,7 +46,7 @@ public class UnitTestDspCallback extends DataSourceProcessorCallback { * @param monitor A monitor for the callback to signal when the data source * processor completes its processing. */ - UnitTestDspCallback(Object monitor) { + FunctionalTestDspCallback(Object monitor) { this.monitor = monitor; } diff --git a/Core/test/unit/src/org/sleuthkit/autopsy/testutils/UnitTestDspProgressMonitor.java b/Core/test/qa-functional/src/org/sleuthkit/autopsy/testutils/FunctionalTestDspProgressMonitor.java similarity index 95% rename from Core/test/unit/src/org/sleuthkit/autopsy/testutils/UnitTestDspProgressMonitor.java rename to Core/test/qa-functional/src/org/sleuthkit/autopsy/testutils/FunctionalTestDspProgressMonitor.java index 1f856e6500..03d26eb9b2 100755 --- a/Core/test/unit/src/org/sleuthkit/autopsy/testutils/UnitTestDspProgressMonitor.java +++ b/Core/test/qa-functional/src/org/sleuthkit/autopsy/testutils/FunctionalTestDspProgressMonitor.java @@ -25,7 +25,7 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgress * A data source processor progress monitor for unit testing. */ @Immutable -public class UnitTestDspProgressMonitor implements DataSourceProcessorProgressMonitor { +public class FunctionalTestDspProgressMonitor implements DataSourceProcessorProgressMonitor { /** * Switches the progress indicator to indeterminate mode (the total number diff --git a/Core/test/unit/src/org/sleuthkit/autopsy/ingest/IngestFileFiltersTest.java b/Core/test/unit/src/org/sleuthkit/autopsy/ingest/IngestFileFiltersTest.java deleted file mode 100755 index 4dbec8bdc8..0000000000 --- a/Core/test/unit/src/org/sleuthkit/autopsy/ingest/IngestFileFiltersTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Autopsy Forensic Browser - * - * Copyright 2011-2017 Basis Technology Corp. - * Contact: carrier sleuthkit org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */package org.sleuthkit.autopsy.ingest; - -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.openide.modules.Places; - -public class IngestFileFiltersTest { - - public IngestFileFiltersTest() { - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - @Test - public void testFilters() { - Places.getUserDirectory().getAbsoluteFile(); - System.out.println("Test filter"); - } -}