Skip to content

Commit

Permalink
Clean up data tables
Browse files Browse the repository at this point in the history
  • Loading branch information
bjuric committed Oct 26, 2024
1 parent cd30ca1 commit 00c2590
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/test/scala/gwen/web/eval/WebDslTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import gwen.web.eval.driver.DriverManager
import gwen.core.GwenOptions
import gwen.core.node.GwenNode
import gwen.core.node.gherkin.Step
import gwen.core.node.gherkin.table.FlatTable
import gwen.core.node.gherkin.table.DataTable
import gwen.core.node.gherkin.StepKeyword
import gwen.core.node.gherkin.table.TableType
import gwen.core.node.gherkin.table.TableOrientation
import gwen.core.state.EnvState
import gwen.core.status._

Expand Down Expand Up @@ -79,7 +79,7 @@ class WebDslTest extends BaseTest with Matchers with MockitoSugar {
envState.topScope.set("<xmlRef>", "xml")
envState.topScope.set("<jsonRef>", "json")
envState.topScope.set("<encoding>", "utf8")
envState.topScope.pushObject("table", new FlatTable(TableType.horizontal, List(List("1", "2")), List("a", "b")))
envState.topScope.pushObject("table", new DataTable(TableOrientation.horizontal, List(List("1", "2")), List("a", "b")))

val engine = new WebEngine()
val ctx = new WebContext(options, envState, mock[DriverManager])
Expand Down
4 changes: 2 additions & 2 deletions src/test/scala/gwen/web/eval/WebEngineTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import gwen.core.node.gherkin.SpecType
import gwen.core.node.gherkin.Step
import gwen.core.node.gherkin.StepKeyword
import gwen.core.node.gherkin.Tag
import gwen.core.node.gherkin.table.FlatTable
import gwen.core.node.gherkin.table.DataTable
import gwen.core.state._
import gwen.core.status.Pending

Expand Down Expand Up @@ -1710,7 +1710,7 @@ class WebEngineTest extends BaseTest with Matchers with MockitoSugar with Before
}

"<step> for each data record" should "evaluate" in {
val mockTable = mock[FlatTable]
val mockTable = mock[DataTable]
doReturn(Some(mockTable)).when(mockTopScope).getObject("table")
doReturn(Nil).when(mockTable).records
val step = evaluate("""x is "1" for each data record""")
Expand Down

0 comments on commit 00c2590

Please sign in to comment.