Skip to content

Commit

Permalink
test(bindings): STOMP test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
Pakisan committed May 1, 2024
1 parent 1554521 commit 2c7a46e
Show file tree
Hide file tree
Showing 24 changed files with 227 additions and 764 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
com.asyncapi.bindings.sns.SNS.class,
com.asyncapi.bindings.solace.Solace.class,
com.asyncapi.bindings.sqs.SQS.class,
// com.asyncapi.bindings.stomp.STOMP.class,
com.asyncapi.bindings.stomp.STOMP.class,
// com.asyncapi.bindings.websockets.WebSockets.class,
})
@SuiteDisplayName("Bindings")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.asyncapi.bindings.stomp;

import org.junit.platform.suite.api.SelectPackages;
import org.junit.platform.suite.api.Suite;
import org.junit.platform.suite.api.SuiteDisplayName;

@Suite
@SuiteDisplayName("STOMP")
@SelectPackages("com.asyncapi.bindings.stomp")
public class STOMP {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package com.asyncapi.bindings.stomp;

import com.asyncapi.bindings.BindingTest;
import com.asyncapi.bindings.stomp.v0._1_0.channel.STOMPChannelBinding;
import com.asyncapi.bindings.stomp.v0._1_0.message.STOMPMessageBinding;
import com.asyncapi.bindings.stomp.v0._1_0.operation.STOMPOperationBinding;
import com.asyncapi.bindings.stomp.v0._1_0.server.STOMPServerBinding;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;

@DisplayName("latest")
public class STOMPLatestTest {

@Nested
@DisplayName("channel")
class ChannelTest extends BindingTest<STOMPChannelBinding> {{
super.binding = new STOMPChannelBinding();
super.bindingTypeClass = STOMPChannelBinding.class;
super.pathToBindingJson = "/bindings/default implementation/unknown version/channel/binding.json";
super.pathToExtendedBindingJson = "/bindings/default implementation/unknown version/channel/binding - extended.json";
super.pathToWronglyExtendedBindingJson = "/bindings/default implementation/unknown version/channel/binding - wrongly extended.json";
}}

@Nested
@DisplayName("message")
class Message extends BindingTest<STOMPMessageBinding> {{
super.binding = new STOMPMessageBinding();
super.bindingTypeClass = STOMPMessageBinding.class;
super.pathToBindingJson = "/bindings/default implementation/unknown version/message/binding.json";
super.pathToExtendedBindingJson = "/bindings/default implementation/unknown version/message/binding - extended.json";
super.pathToWronglyExtendedBindingJson = "/bindings/default implementation/unknown version/message/binding - wrongly extended.json";
}}

@Nested
@DisplayName("operation")
class Operation extends BindingTest<STOMPOperationBinding> {{
super.binding = new STOMPOperationBinding();
super.bindingTypeClass = STOMPOperationBinding.class;
super.pathToBindingJson = "/bindings/default implementation/unknown version/operation/binding.json";
super.pathToExtendedBindingJson = "/bindings/default implementation/unknown version/operation/binding - extended.json";
super.pathToWronglyExtendedBindingJson = "/bindings/default implementation/unknown version/operation/binding - wrongly extended.json";
}}

@Nested
@DisplayName("server")
class Server extends BindingTest<STOMPServerBinding> {{
super.binding = new STOMPServerBinding();
super.bindingTypeClass = STOMPServerBinding.class;
super.pathToBindingJson = "/bindings/default implementation/unknown version/server/binding.json";
super.pathToExtendedBindingJson = "/bindings/default implementation/unknown version/server/binding - extended.json";
super.pathToWronglyExtendedBindingJson = "/bindings/default implementation/unknown version/server/binding - wrongly extended.json";
}}

}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package com.asyncapi.bindings.stomp;

import com.asyncapi.bindings.BindingTest;
import com.asyncapi.bindings.stomp.v0._1_0.channel.STOMPChannelBinding;
import com.asyncapi.bindings.stomp.v0._1_0.message.STOMPMessageBinding;
import com.asyncapi.bindings.stomp.v0._1_0.operation.STOMPOperationBinding;
import com.asyncapi.bindings.stomp.v0._1_0.server.STOMPServerBinding;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;

@DisplayName("unknown version")
public class STOMPUnknownVersionTest {

@Nested
@DisplayName("channel")
class ChannelTest extends BindingTest<STOMPChannelBinding> {{
super.binding = new STOMPChannelBinding();
super.bindingTypeClass = STOMPChannelBinding.class;
super.pathToBindingJson = "/bindings/default implementation/unknown version/channel/binding.json";
super.pathToExtendedBindingJson = "/bindings/default implementation/unknown version/channel/binding - extended.json";
super.pathToWronglyExtendedBindingJson = "/bindings/default implementation/unknown version/channel/binding - wrongly extended.json";
}}

@Nested
@DisplayName("message")
class Message extends BindingTest<STOMPMessageBinding> {{
super.binding = new STOMPMessageBinding();
super.bindingTypeClass = STOMPMessageBinding.class;
super.pathToBindingJson = "/bindings/default implementation/unknown version/message/binding.json";
super.pathToExtendedBindingJson = "/bindings/default implementation/unknown version/message/binding - extended.json";
super.pathToWronglyExtendedBindingJson = "/bindings/default implementation/unknown version/message/binding - wrongly extended.json";
}}

@Nested
@DisplayName("operation")
class Operation extends BindingTest<STOMPOperationBinding> {{
super.binding = new STOMPOperationBinding();
super.bindingTypeClass = STOMPOperationBinding.class;
super.pathToBindingJson = "/bindings/default implementation/unknown version/operation/binding.json";
super.pathToExtendedBindingJson = "/bindings/default implementation/unknown version/operation/binding - extended.json";
super.pathToWronglyExtendedBindingJson = "/bindings/default implementation/unknown version/operation/binding - wrongly extended.json";
}}

@Nested
@DisplayName("server")
class Server extends BindingTest<STOMPServerBinding> {{
super.binding = new STOMPServerBinding();
super.bindingTypeClass = STOMPServerBinding.class;
super.pathToBindingJson = "/bindings/default implementation/unknown version/server/binding.json";
super.pathToExtendedBindingJson = "/bindings/default implementation/unknown version/server/binding - extended.json";
super.pathToWronglyExtendedBindingJson = "/bindings/default implementation/unknown version/server/binding - wrongly extended.json";
}}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package com.asyncapi.bindings.stomp;

import com.asyncapi.bindings.BindingTest;
import com.asyncapi.bindings.stomp.v0._1_0.channel.STOMPChannelBinding;
import com.asyncapi.bindings.stomp.v0._1_0.message.STOMPMessageBinding;
import com.asyncapi.bindings.stomp.v0._1_0.operation.STOMPOperationBinding;
import com.asyncapi.bindings.stomp.v0._1_0.server.STOMPServerBinding;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;

@DisplayName("0.1.0")
public class STOMPV0_1_0Test {

@Nested
@DisplayName("channel")
class ChannelTest extends BindingTest<STOMPChannelBinding> {{
super.binding = new STOMPChannelBinding();
super.bindingTypeClass = STOMPChannelBinding.class;
super.pathToBindingJson = "/bindings/default implementation/unknown version/channel/binding.json";
super.pathToExtendedBindingJson = "/bindings/default implementation/unknown version/channel/binding - extended.json";
super.pathToWronglyExtendedBindingJson = "/bindings/default implementation/unknown version/channel/binding - wrongly extended.json";
}}

@Nested
@DisplayName("message")
class Message extends BindingTest<STOMPMessageBinding> {{
super.binding = new STOMPMessageBinding();
super.bindingTypeClass = STOMPMessageBinding.class;
super.pathToBindingJson = "/bindings/default implementation/unknown version/message/binding.json";
super.pathToExtendedBindingJson = "/bindings/default implementation/unknown version/message/binding - extended.json";
super.pathToWronglyExtendedBindingJson = "/bindings/default implementation/unknown version/message/binding - wrongly extended.json";
}}

@Nested
@DisplayName("operation")
class Operation extends BindingTest<STOMPOperationBinding> {{
super.binding = new STOMPOperationBinding();
super.bindingTypeClass = STOMPOperationBinding.class;
super.pathToBindingJson = "/bindings/default implementation/unknown version/operation/binding.json";
super.pathToExtendedBindingJson = "/bindings/default implementation/unknown version/operation/binding - extended.json";
super.pathToWronglyExtendedBindingJson = "/bindings/default implementation/unknown version/operation/binding - wrongly extended.json";
}}

@Nested
@DisplayName("server")
class Server extends BindingTest<STOMPServerBinding> {{
super.binding = new STOMPServerBinding();
super.bindingTypeClass = STOMPServerBinding.class;
super.pathToBindingJson = "/bindings/default implementation/unknown version/server/binding.json";
super.pathToExtendedBindingJson = "/bindings/default implementation/unknown version/server/binding - extended.json";
super.pathToWronglyExtendedBindingJson = "/bindings/default implementation/unknown version/server/binding - wrongly extended.json";
}}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package com.asyncapi.bindings.stomp;

import com.asyncapi.bindings.BindingTest;
import com.asyncapi.bindings.stomp.v0._1_0.channel.STOMPChannelBinding;
import com.asyncapi.bindings.stomp.v0._1_0.message.STOMPMessageBinding;
import com.asyncapi.bindings.stomp.v0._1_0.operation.STOMPOperationBinding;
import com.asyncapi.bindings.stomp.v0._1_0.server.STOMPServerBinding;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;

@DisplayName("without version")
public class STOMPWithoutVersionTest {

@Nested
@DisplayName("channel")
class ChannelTest extends BindingTest<STOMPChannelBinding> {{
super.binding = new STOMPChannelBinding();
super.bindingTypeClass = STOMPChannelBinding.class;
super.pathToBindingJson = "/bindings/default implementation/unknown version/channel/binding.json";
super.pathToExtendedBindingJson = "/bindings/default implementation/unknown version/channel/binding - extended.json";
super.pathToWronglyExtendedBindingJson = "/bindings/default implementation/unknown version/channel/binding - wrongly extended.json";
}}

@Nested
@DisplayName("message")
class Message extends BindingTest<STOMPMessageBinding> {{
super.binding = new STOMPMessageBinding();
super.bindingTypeClass = STOMPMessageBinding.class;
super.pathToBindingJson = "/bindings/default implementation/unknown version/message/binding.json";
super.pathToExtendedBindingJson = "/bindings/default implementation/unknown version/message/binding - extended.json";
super.pathToWronglyExtendedBindingJson = "/bindings/default implementation/unknown version/message/binding - wrongly extended.json";
}}

@Nested
@DisplayName("operation")
class Operation extends BindingTest<STOMPOperationBinding> {{
super.binding = new STOMPOperationBinding();
super.bindingTypeClass = STOMPOperationBinding.class;
super.pathToBindingJson = "/bindings/default implementation/unknown version/operation/binding.json";
super.pathToExtendedBindingJson = "/bindings/default implementation/unknown version/operation/binding - extended.json";
super.pathToWronglyExtendedBindingJson = "/bindings/default implementation/unknown version/operation/binding - wrongly extended.json";
}}

@Nested
@DisplayName("server")
class Server extends BindingTest<STOMPServerBinding> {{
super.binding = new STOMPServerBinding();
super.bindingTypeClass = STOMPServerBinding.class;
super.pathToBindingJson = "/bindings/default implementation/unknown version/server/binding.json";
super.pathToExtendedBindingJson = "/bindings/default implementation/unknown version/server/binding - extended.json";
super.pathToWronglyExtendedBindingJson = "/bindings/default implementation/unknown version/server/binding - wrongly extended.json";
}}

}

This file was deleted.

Loading

0 comments on commit 2c7a46e

Please sign in to comment.