diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2017-08-15 00:36:52 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2017-08-15 00:36:52 +0200 |
commit | 7361fde5f06692a0e1b83d53756bb536627f2d02 (patch) | |
tree | fe6be30b090f47813da7edce7f45f7583a6ae6d3 /kamon-testkit/src/main/scala/kamon/testkit | |
parent | a90d4aa75e7fdf12a85177f4e81463439bfe5bb3 (diff) | |
download | Kamon-7361fde5f06692a0e1b83d53756bb536627f2d02.tar.gz Kamon-7361fde5f06692a0e1b83d53756bb536627f2d02.tar.bz2 Kamon-7361fde5f06692a0e1b83d53756bb536627f2d02.zip |
add ContextTesting utilities
Diffstat (limited to 'kamon-testkit/src/main/scala/kamon/testkit')
-rw-r--r-- | kamon-testkit/src/main/scala/kamon/testkit/ContextTesting.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kamon-testkit/src/main/scala/kamon/testkit/ContextTesting.scala b/kamon-testkit/src/main/scala/kamon/testkit/ContextTesting.scala new file mode 100644 index 00000000..507f17ad --- /dev/null +++ b/kamon-testkit/src/main/scala/kamon/testkit/ContextTesting.scala @@ -0,0 +1,11 @@ +package kamon.testkit + +import kamon.context.{Context, Key} + +trait ContextTesting { + val TestLocalKey = Key.local[Option[String]]("test-local-key", None) + val TestBroadcastKey = Key.broadcast[Option[String]]("test-local-key", None) + + def contextWithLocal(value: String): Context = + Context.create(TestLocalKey, Some(value)) +} |