|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
* Copyright 2012-2021 the original author or authors.
|
|
|
|
|
* Copyright 2012-2022 the original author or authors.
|
|
|
|
|
*
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
@ -30,6 +30,7 @@ import org.apache.tomcat.websocket.WsWebSocketContainer;
|
|
|
|
|
import org.junit.jupiter.api.AfterEach;
|
|
|
|
|
import org.junit.jupiter.api.BeforeEach;
|
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
|
import org.skyscreamer.jsonassert.JSONAssert;
|
|
|
|
|
|
|
|
|
|
import org.springframework.boot.LazyInitializationBeanFactoryPostProcessor;
|
|
|
|
|
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
|
|
|
@ -101,7 +102,7 @@ class WebSocketMessagingAutoConfigurationTests {
|
|
|
|
|
@Test
|
|
|
|
|
void basicMessagingWithJsonResponse() throws Throwable {
|
|
|
|
|
Object result = performStompSubscription("/app/json");
|
|
|
|
|
assertThat(new String((byte[]) result)).isEqualTo(String.format("{%n \"foo\" : 5,%n \"bar\" : \"baz\"%n}"));
|
|
|
|
|
JSONAssert.assertEquals("{\"foo\" : 5,\"bar\" : \"baz\"}", new String((byte[]) result), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|