I'm trying to test a FlexiRoute I've developed that dpeending on the type 
of element it receives, it routes it either the keep alive signal or the 
gnip activity to different flows. Here's the approach I'm trying:

class ActivityFlexiRouterSpec extends FlatSpec with GivenWhenThen{
  implicit val system = ActorSystem("TEST")
  implicit val materializer = 
ActorMaterializer(ActorMaterializerSettings(system))
  behavior of "ActivityFlexiRouter"

  it should "route the KeepAliveSignal to the KeepAliveSignalFlow" in {
    Given("A FlowGraph an ActivityFlexiRouter and a KeepAliveSignal")
    val newFlowProbe = TestSink.probe[GnipActivity]
    val keepAliveFlowProbe = TestSubscriber.manualProbe[GnipActivity]
    val graph = FlowGraph.closed() { implicit b =>
      val route = b.add(new ActivityFlexiRouter)

      Source.single(KeepAliveSignal) ~> route.in
      route.newActivityFlow ~> newFlowProbe
      route.keepAliveSignalFlow ~> keepAliveFlowProbe
    }

    When("the graph is run")
    graph.run()

    Then("assert something")
    assert(keepAliveFlowProbe.)
  }

}

I must say neither of the newFlowProbe or keepAliveFlowProbe are working, 
but I wanted to give some idea of the couple of the things I've tried. 
Could anyone give me any hint on how to test this?

Thanks!

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to