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() . |
java.lang.String |
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 java.lang.String topicPath()
public void publish(java.util.List<PubsubMessage> messages) throws java.io.IOException
topicPath()
.java.io.IOException