public class TestPubsub extends java.lang.Object implements org.junit.rules.TestRule
Deletes topic on shutdown.
Modifier and Type | Method and Description |
---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
Description description) |
static TestPubsub |
create()
Creates an instance of this rule.
|
void |
publish(java.util.List<PubsubMessage> messages)
Publish messages to
topicPath() . |
PubsubClient.TopicPath |
topicPath()
Topic path where events will be published to.
|
public static TestPubsub create()
Loads GCP configuration from TestPipelineOptions
.
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, Description description)
apply
in interface org.junit.rules.TestRule
public PubsubClient.TopicPath topicPath()
public void publish(java.util.List<PubsubMessage> messages) throws java.io.IOException
topicPath()
.java.io.IOException