diff options
author | Ivan Topolnak <ivantopo@gmail.com> | 2013-09-25 19:45:54 -0300 |
---|---|---|
committer | Ivan Topolnak <ivantopo@gmail.com> | 2013-09-25 19:45:54 -0300 |
commit | 604d5801332838f8bea25fe25cb8df5dbb82af08 (patch) | |
tree | ad107e08888f0aad82899d394ec738c5da29dd5a /kamon-core/src/test | |
parent | 50823a3cc4f6644d569255c7e04423c36eedf295 (diff) | |
download | Kamon-604d5801332838f8bea25fe25cb8df5dbb82af08.tar.gz Kamon-604d5801332838f8bea25fe25cb8df5dbb82af08.tar.bz2 Kamon-604d5801332838f8bea25fe25cb8df5dbb82af08.zip |
wip
Diffstat (limited to 'kamon-core/src/test')
-rw-r--r-- | kamon-core/src/test/scala/ExtraSpec.scala | 34 |
1 files changed, 34 insertions, 0 deletions
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)*/ + + |