diff --git a/vuu/src/test/scala/org/finos/vuu/core/module/metrics/MetricsTableProviderTest.scala b/vuu/src/test/scala/org/finos/vuu/core/module/metrics/MetricsTableProviderTest.scala index 2977cfa5a..fadbc57a9 100644 --- a/vuu/src/test/scala/org/finos/vuu/core/module/metrics/MetricsTableProviderTest.scala +++ b/vuu/src/test/scala/org/finos/vuu/core/module/metrics/MetricsTableProviderTest.scala @@ -3,7 +3,7 @@ package org.finos.vuu.core.module.metrics import org.finos.toolbox.jmx.{MetricsProvider, MetricsProviderImpl} import org.finos.toolbox.lifecycle.{LifeCycleComponentContext, LifecycleContainer, LifecycleEnabled} import org.finos.toolbox.time.{Clock, TestFriendlyClock} -import org.finos.vuu.core.table.{DataTable, TableContainer} +import org.finos.vuu.core.table.{DataTable, RowData, TableContainer} import org.finos.vuu.core.table.TableMockFactory._ import org.finos.vuu.test.TestFriendlyJoinTableProvider import org.scalamock.scalatest.MockFactory @@ -34,10 +34,10 @@ class MetricsTableProviderTest extends AnyFeatureSpec with Matchers with MockFac metricsTableProvider.runOnce() - (mockTable.processUpdate _).verify("instrumentsSessionTable_1", *, *).once - (mockTable.processUpdate _).verify("instrumentsSessionTable_2", *, *).once - (mockTable.processUpdate _).verify("fills_table", *, *).once - (mockTable.processUpdate _).verify("other", *, *).once + (mockTable.processUpdate(_: String, _: RowData, _: Long)).verify("instrumentsSessionTable_1", *, *).once + (mockTable.processUpdate(_: String, _: RowData, _: Long)).verify("instrumentsSessionTable_2", *, *).once + (mockTable.processUpdate(_: String, _: RowData, _: Long)).verify("fills_table", *, *).once + (mockTable.processUpdate(_: String, _: RowData, _: Long)).verify("other", *, *).once } } } diff --git a/vuu/src/test/scala/org/finos/vuu/test/FakeInMemoryTable.scala b/vuu/src/test/scala/org/finos/vuu/test/FakeInMemoryTable.scala index 5df637338..931cdec00 100644 --- a/vuu/src/test/scala/org/finos/vuu/test/FakeInMemoryTable.scala +++ b/vuu/src/test/scala/org/finos/vuu/test/FakeInMemoryTable.scala @@ -2,23 +2,27 @@ package org.finos.vuu.test import org.finos.vuu.api.TableDef import org.finos.vuu.core.index.IndexedField +import org.finos.vuu.core.row.RowBuilder import org.finos.vuu.core.table.{Column, ColumnValueProvider, DataTable, KeyObserver, RowData, RowKeyUpdate, RowWithData, TableData, TablePrimaryKeys} import org.finos.vuu.viewport.{RowProcessor, ViewPortColumns} class FakeInMemoryTable(val instanceName: String, val tableDef: TableDef) extends DataTable { - private val rowMap = scala.collection.mutable.HashMap.empty[String, RowWithData] + private val rowMap = scala.collection.mutable.HashMap.empty[String, RowData] override def name: String = instanceName override def getTableDef: TableDef = tableDef - override def processUpdate(rowKey: String, rowUpdate: RowWithData, timeStamp: Long): Unit = + override def newRow(key: String): RowBuilder = ??? + override def rowBuilder: RowBuilder = ??? + + override def processUpdate(rowKey: String, rowUpdate: RowData, timeStamp: Long): Unit = rowMap += (rowKey -> rowUpdate) override def pullRow(key: String): RowData = rowMap.getOrElse(key, throw new Exception(s"Could not find row data for key $key in table $name")) - def pullAllRows() : List[RowWithData] = rowMap.values.toList + def pullAllRows() : List[RowData] = rowMap.values.toList override protected def createDataTableData(): TableData = ???