class ModelReaderServiceTest extends AsyncWordSpec with Matchers with BeforeAndAfterAll {
private val server = ServiceTest.startServer(
ServiceTest.defaultSetup
.withCassandra(true)
) { ctx =>
new ModelReaderApplication(ctx) with LocalServiceLocator
}
val modelService = server.serviceClient.implement[ModelService]
val modelReaderService = server.serviceClient.implement[ModelReaderService]
val product1 = Product("product1", 1, "g1")
override protected def afterAll() = server.stop()
val modelId = UUIDs.timeBased()
implicit val mat = server.materializer
"model service" should {
"create model" in {
for {
created <- modelService.createModel(modelId).invoke("my model")
addedProduct <- modelService.addProduct(modelId).invoke(product1)
fromReader <- {
Thread.sleep(2000)
modelReaderService.getModel(modelId).invoke()
}
any help much appreciated!
Lagom will provide support for writing integration tests that involve several interacting services. This feature is not yet implemented.
--
You received this message because you are subscribed to the Google Groups "Lagom Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lagom-framework+unsubscribe@googlegroups.com.
To post to this group, send email to lagom-framework@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lagom-framework/5fac9b71-41e5-4ed9-a796-39e558ff4a51%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.