Skip to content

Instantly share code, notes, and snippets.

@ktoso
Created March 31, 2015 15:30
Show Gist options
  • Select an option

  • Save ktoso/e91f71f7865e397c2d64 to your computer and use it in GitHub Desktop.

Select an option

Save ktoso/e91f71f7865e397c2d64 to your computer and use it in GitHub Desktop.
tck test for 1 element publisher
/**
* Copyright (C) 2014 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.stream.tck
import akka.stream.impl.MaterializedValuePublisher
import org.reactivestreams.Publisher
class MaterializedValuePublisherTest extends AkkaPublisherVerification[Any] {
override def createPublisher(elements: Long): Publisher[Any] = {
val pub = new MaterializedValuePublisher()
// it contains a value already
pub.setValue("Hello")
pub
}
override def maxElementsFromPublisher = 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment