diff --git a/src/test/java/nl/esciencecenter/PubmetricBenchmarksTest.java b/src/test/java/nl/esciencecenter/PubmetricBenchmarksTest.java deleted file mode 100644 index f7a008c..0000000 --- a/src/test/java/nl/esciencecenter/PubmetricBenchmarksTest.java +++ /dev/null @@ -1,81 +0,0 @@ -package nl.esciencecenter; - -import org.json.JSONObject; -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.assertFalse; - -import java.io.IOException; - -import nl.esciencecenter.restape.ToolBenchmarkingAPIs; - -public class PubmetricBenchmarksTest { - - // @Test - // public void testSendPostToPubmetricWithFile() throws IOException { - // // Read CWL file content from the file system - // File cwlFile = new File("/Users/vedran/Downloads/candidate_workflow_4.cwl"); // Replace with the actual path - // byte[] fileContent = Files.readAllBytes(cwlFile.toPath()); - - // // Call the method to test - // JSONObject response = ToolBenchmarkingAPIs.sendPostToPubmetric(fileContent); - - // // Verify that the response is not null - // assertFalse(response.isEmpty()); - // } - - @Test - public void testSendPostToPubmetricWithString() throws IOException { - // Hardcoded CWL content string - String cwlFileContent = """ - # WorkflowNo_3 -# This workflow is generated by APE (https://github.com/sanctuuary/APE). -cwlVersion: v1.2 -class: Workflow - -label: WorkflowNo_3 -doc: A workflow including the tool(s) Comet, idconvert, ProteinProphet. - -inputs: - input_1: - type: File - format: "http://edamontology.org/format_3244" # mzML - input_2: - type: File - format: "http://edamontology.org/format_1929" # FASTA -steps: - Comet_01: - run: https://raw.githubusercontent.com/Workflomics/containers/main/cwl/tools/Comet/Comet.cwl - in: - Comet_in_1: input_1 - Comet_in_2: input_2 - out: [Comet_out_1, Comet_out_2, Comet_out_3] - idconvert_02: - run: https://raw.githubusercontent.com/Workflomics/containers/main/cwl/tools/idconvert/idconvert_to_pepXML.cwl - in: - idconvert_in_1: Comet_01/Comet_out_2 - out: [idconvert_out_1] - ProteinProphet_03: - run: https://raw.githubusercontent.com/Workflomics/containers/main/cwl/tools/ProteinProphet/ProteinProphet.cwl - in: - ProteinProphet_in_1: idconvert_02/idconvert_out_1 - ProteinProphet_in_2: input_2 - out: [ProteinProphet_out_1, ProteinProphet_out_2] -outputs: - output_1: - type: File - format: "http://edamontology.org/format_3747" # protXML - outputSource: ProteinProphet_03/ProteinProphet_out_1 - - """; - - // Convert the string to a byte array - byte[] cwlFileBytes = cwlFileContent.getBytes(); - - // Call the method to test - JSONObject response = ToolBenchmarkingAPIs.sendPostToPubmetric(cwlFileBytes); - - // Verify that the response is not null - assertFalse(response.isEmpty()); - } -} \ No newline at end of file