From 96e89d0908c479360d4a915c916e341e148a91c7 Mon Sep 17 00:00:00 2001 From: Ivan Topolnak Date: Wed, 25 Sep 2013 19:45:54 -0300 Subject: wip --- kamon-core/src/test/scala/ExtraSpec.scala | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 kamon-core/src/test/scala/ExtraSpec.scala (limited to 'kamon-core/src/test') diff --git a/kamon-core/src/test/scala/ExtraSpec.scala b/kamon-core/src/test/scala/ExtraSpec.scala new file mode 100644 index 00000000..b8dc053d --- /dev/null +++ b/kamon-core/src/test/scala/ExtraSpec.scala @@ -0,0 +1,34 @@ +import akka.actor.ActorSystem +import akka.testkit.TestKit +import org.scalatest.WordSpecLike +import shapeless._ + +class ExtraSpec extends TestKit(ActorSystem("ExtraSpec")) with WordSpecLike { + + "the Extra pattern helper" should { + "be constructed from a finite number of types" in { + Extra.expecting[String :: Int :: HNil].as[Person] + } + } + + case class Person(name: String, age: Int) +} + +/** + * Desired Features: + * 1. Expect messages of different types, apply a function and forward to some other. + */ + +object Extra { + def expecting[T <: HList] = new Object { + def as[U <: Product] = ??? + } +} + +/* +extra of { + expect[A] in { actor ! msg} + expect[A] in { actor ! msg} +} as (A, A) pipeTo (z)*/ + + -- cgit v1.2.3