retest / gui-state-machine-api

API for the creation and modification of incomplete state machines which represent the exploration of a GUI application.
2 stars 1 forks source link

Replace trait-implementing objects with classes #12

Closed beatngu13 closed 5 years ago

beatngu13 commented 5 years ago

For instance, GuiStateMachineApi and its implementation look as follows:

trait GuiStateMachineApi { /* ... */ }

object GuiStateMachineApiImpl extends GuiStateMachineApi { /* ... */ }

Is this a thing in Scala to let objects implement traits? In Java, it looks a bit odd since I cannot code against the actual API anymore. Instead, I have to use the implementation directly:

Id stateMachineId = GuiStateMachineApiImpl.createStateMachine();
// ...
tdauth commented 5 years ago

Done. See https://github.com/retest/gui-state-machine-api/commit/cc012454225d53c937ef0bc494821f4281427856