Search in sources :

Example 1 with PubSubConfiguration

use of com.google.cloud.spring.pubsub.core.PubSubConfiguration in project spring-cloud-gcp by GoogleCloudPlatform.

the class DefaultSubscriberFactoryTests method setUp.

@BeforeEach
void setUp() {
    this.pubSubConfig = new PubSubConfiguration();
    this.pubSubConfig.initialize("some-project");
}
Also used : PubSubConfiguration(com.google.cloud.spring.pubsub.core.PubSubConfiguration) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with PubSubConfiguration

use of com.google.cloud.spring.pubsub.core.PubSubConfiguration in project spring-cloud-gcp by GoogleCloudPlatform.

the class DefaultSubscriberFactory method getBlankConfiguration.

private static PubSubConfiguration getBlankConfiguration(GcpProjectIdProvider projectIdProvider) {
    if (projectIdProvider == null) {
        return null;
    }
    PubSubConfiguration config = new PubSubConfiguration();
    config.initialize(projectIdProvider.getProjectId());
    return config;
}
Also used : PubSubConfiguration(com.google.cloud.spring.pubsub.core.PubSubConfiguration)

Example 3 with PubSubConfiguration

use of com.google.cloud.spring.pubsub.core.PubSubConfiguration in project spring-cloud-gcp by GoogleCloudPlatform.

the class DefaultSubscriberFactoryTests method testGetPullEndpoint_newConfiguration.

@Test
public void testGetPullEndpoint_newConfiguration() {
    DefaultSubscriberFactory factory = new DefaultSubscriberFactory(() -> "project", new PubSubConfiguration());
    assertThat(factory.getPullEndpoint("subscription-name")).isNull();
}
Also used : PubSubConfiguration(com.google.cloud.spring.pubsub.core.PubSubConfiguration) Test(org.junit.Test)

Aggregations

PubSubConfiguration (com.google.cloud.spring.pubsub.core.PubSubConfiguration)3 Test (org.junit.Test)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1