You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Test
public void emptyJGivenTable() {
given().create_table(Collections.emptyList());
}
static class TestStage extends Stage<TestStage> {
public TestStage create_table(@Table List l) {
return self();
}
}
results in an exception:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:657)
at java.util.ArrayList.get(ArrayList.java:433)
at com.tngtech.jgiven.report.text.PlainTextTableWriter.getColumnSpecs(PlainTextTableWriter.java:114)
at com.tngtech.jgiven.report.text.PlainTextTableWriter.writeDataTable(PlainTextTableWriter.java:31)
at com.tngtech.jgiven.report.text.PlainTextScenarioWriter.printDataTable(PlainTextScenarioWriter.java:178)
at com.tngtech.jgiven.report.text.PlainTextScenarioWriter.printStep(PlainTextScenarioWriter.java:139)
at com.tngtech.jgiven.report.text.PlainTextScenarioWriter.visit(PlainTextScenarioWriter.java:93)
at com.tngtech.jgiven.report.model.StepModel.accept(StepModel.java:77)
at com.tngtech.jgiven.report.model.ScenarioCaseModel.accept(ScenarioCaseModel.java:73)
at com.tngtech.jgiven.report.model.ScenarioModel.accept(ScenarioModel.java:28)
at com.tngtech.jgiven.report.text.PlainTextReporter.visit(PlainTextReporter.java:68)
at com.tngtech.jgiven.report.model.ScenarioModel.accept(ScenarioModel.java:26)
at com.tngtech.jgiven.report.model.ReportModel.accept(ReportModel.java:45)
at com.tngtech.jgiven.report.text.PlainTextReporter.write(PlainTextReporter.java:51)
at com.tngtech.jgiven.report.impl.CommonReportHelper.finishReport(CommonReportHelper.java:30)
at com.tngtech.jgiven.junit.JGivenClassRule.finished(JGivenClassRule.java:22)
at org.junit.rules.TestWatcher.finishedQuietly(TestWatcher.java:117)
at org.junit.rules.TestWatcher.access$400(TestWatcher.java:46)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:64)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:193)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Using additional attributes on @table might cause different exceptions, but I assume the root cause is the same.
Best regards,
Niko
The text was updated successfully, but these errors were encountered:
Hi,
results in an exception:
Using additional attributes on @table might cause different exceptions, but I assume the root cause is the same.
Best regards,
Niko
The text was updated successfully, but these errors were encountered: