Skip to content

Commit

Permalink
move test
Browse files Browse the repository at this point in the history
Co-authored-by: steffengreiner <[email protected]>
  • Loading branch information
KochTobi and Steffengreiner committed Sep 17, 2024
1 parent 4294945 commit bbdfa72
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 30 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package life.qbic.datamanager.spreadsheet


import org.apache.poi.ss.usermodel.Workbook
import org.apache.poi.ss.usermodel.WorkbookFactory
import spock.lang.Specification

class XLSXTemplateHelperTest extends Specification {
Expand All @@ -19,4 +22,18 @@ class XLSXTemplateHelperTest extends Specification {
"this is a test*" | "thisIsATest"

}

def "test that column reference works"() {
given:
Workbook workbook = WorkbookFactory.create(true)
def sheet = workbook.createSheet("My sheet")
when:
var result = XLSXTemplateHelper.createOptionArea(sheet,
"test values",
List.of("test1", "test2", "aböüß"))
then:
result.getRefersToFormula() == "'My sheet'!\$A\$1:\$A\$4"
result.getNameName() == "testValues"
workbook.getName("testValues") != null
}
}

0 comments on commit bbdfa72

Please sign in to comment.