org.springframework.protobuf.SecondMsg Java Examples
The following examples show how to use
org.springframework.protobuf.SecondMsg.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProtobufHttpMessageConverterTests.java From spring-analysis-note with MIT License | 5 votes |
@Before public void setup() { this.registryInitializer = mock(ExtensionRegistryInitializer.class); this.extensionRegistry = mock(ExtensionRegistry.class); this.converter = new ProtobufHttpMessageConverter(this.registryInitializer); this.testMsg = Msg.newBuilder().setFoo("Foo").setBlah(SecondMsg.newBuilder().setBlah(123).build()).build(); }
Example #2
Source File: ProtobufJsonFormatHttpMessageConverterTests.java From spring-analysis-note with MIT License | 5 votes |
@Before public void setup() { this.registryInitializer = mock(ExtensionRegistryInitializer.class); this.extensionRegistry = mock(ExtensionRegistry.class); this.converter = new ProtobufJsonFormatHttpMessageConverter( JsonFormat.parser(), JsonFormat.printer(), this.registryInitializer); this.testMsg = Msg.newBuilder().setFoo("Foo").setBlah(SecondMsg.newBuilder().setBlah(123).build()).build(); }
Example #3
Source File: CancelWithoutDemandCodecTests.java From spring-analysis-note with MIT License | 5 votes |
@Test // gh-22543 public void cancelWithProtobufEncoder() { ProtobufEncoder encoder = new ProtobufEncoder(); Msg msg = Msg.newBuilder().setFoo("Foo").setBlah(SecondMsg.newBuilder().setBlah(123).build()).build(); Flux<DataBuffer> flux = encoder.encode(Mono.just(msg), this.bufferFactory, ResolvableType.forClass(Msg.class), new MimeType("application", "x-protobuf"), Collections.emptyMap()); BaseSubscriber<DataBuffer> subscriber = new ZeroDemandSubscriber(); flux.subscribe(subscriber); // Assume sync execution (e.g. encoding with Flux.just).. subscriber.cancel(); }
Example #4
Source File: ProtobufHttpMessageConverterTests.java From java-technology-stack with MIT License | 5 votes |
@Before public void setup() { this.registryInitializer = mock(ExtensionRegistryInitializer.class); this.extensionRegistry = mock(ExtensionRegistry.class); this.converter = new ProtobufHttpMessageConverter(this.registryInitializer); this.testMsg = Msg.newBuilder().setFoo("Foo").setBlah(SecondMsg.newBuilder().setBlah(123).build()).build(); }
Example #5
Source File: ProtobufJsonFormatHttpMessageConverterTests.java From java-technology-stack with MIT License | 5 votes |
@Before public void setup() { this.registryInitializer = mock(ExtensionRegistryInitializer.class); this.extensionRegistry = mock(ExtensionRegistry.class); this.converter = new ProtobufJsonFormatHttpMessageConverter( JsonFormat.parser(), JsonFormat.printer(), this.registryInitializer); this.testMsg = Msg.newBuilder().setFoo("Foo").setBlah(SecondMsg.newBuilder().setBlah(123).build()).build(); }
Example #6
Source File: ProtobufHttpMessageConverterTests.java From spring4-understanding with Apache License 2.0 | 4 votes |
@Before public void setUp() { this.registryInitializer = mock(ExtensionRegistryInitializer.class); this.converter = new ProtobufHttpMessageConverter(this.registryInitializer); this.testMsg = Msg.newBuilder().setFoo("Foo").setBlah(SecondMsg.newBuilder().setBlah(123).build()).build(); }