// TODO nf-core: Once you have added the required tests, please run the following command to build this file:
// nf-core subworkflows test {{ component_name }}
nextflow_workflow {

    name "Test Subworkflow {{ component_name_underscore|upper }}"
    script "../main.nf"
    workflow "{{ component_name_underscore|upper }}"

    tag "subworkflows"
    tag "subworkflows_{{ org_alphabet }}"
    tag "subworkflows/{{ component_name }}"
    // TODO nf-core: Add tags for all modules used within this subworkflow. Example:
    tag "samtools"
    tag "samtools/sort"
    tag "samtools/index"


    // TODO nf-core: Change the test name preferably indicating the test-data and file-format used
    test("sarscov2 - bam - single_end") {

        when {
            workflow {
                """
                // TODO nf-core: define inputs of the workflow here. Example:
                input[0] = [
                    [ id:'test', single_end:false ], // meta map
                    file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
                ]
                input[1] = [
                    [ id:'genome' ],
                    file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
                ]
                """
            }
        }

        then {
            assertAll(
                { assert workflow.success},
                { assert snapshot(workflow.out).match()}
                //TODO nf-core: Add all required assertions to verify the test output.
            )
        }
    }
}
