Skip to content

Commit

Permalink
Refactor code base
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeshLK committed Aug 11, 2023
1 parent 6db52ea commit 5f114c6
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 32 deletions.
16 changes: 8 additions & 8 deletions ballerina/tests/jms_message_listener_tests.bal
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ isolated function testQueueMessageListener() returns error? {

MapMessage mapMessage = {
content: {
"user": "John Doe",
"message": "This is a sample message"
user: "John Doe",
message: "This is a sample message"
}
};
check queue3Producer->send(mapMessage);
Expand Down Expand Up @@ -173,8 +173,8 @@ isolated function testTopicMessageListener() returns error? {

MapMessage mapMessage = {
content: {
"user": "John Doe",
"message": "This is a sample message"
user: "John Doe",
message: "This is a sample message"
}
};
check topic3Producer->send(mapMessage);
Expand Down Expand Up @@ -252,8 +252,8 @@ function testNonIsolatedMessageListener() returns error? {

MapMessage mapMessage = {
content: {
"user": "John Doe",
"message": "This is a sample message"
user: "John Doe",
message: "This is a sample message"
}
};
check producer->send(mapMessage);
Expand Down Expand Up @@ -339,8 +339,8 @@ isolated function testMessageListenerWithCaller() returns error? {

MapMessage mapMessage = {
content: {
"user": "John Doe",
"message": "This is a sample message"
user: "John Doe",
message: "This is a sample message"
}
};
check producer->send(mapMessage);
Expand Down
8 changes: 4 additions & 4 deletions ballerina/tests/jms_queue_tests.bal
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ isolated function testQueueWithTextMessage() returns error? {
}
isolated function testQueueWithMapMessage() returns error? {
map<anydata> content = {
"user": "John Doe",
"message": "This is a sample message"
user: "John Doe",
message: "This is a sample message"
};
MapMessage message = {
content: content
Expand Down Expand Up @@ -136,8 +136,8 @@ isolated function testQueueWithTextMessageUsingSendTo() returns error? {
}
isolated function testQueueWithMapMessageUsingSendTo() returns error? {
map<anydata> content = {
"user": "John Doe",
"message": "This is a sample message"
user: "John Doe",
message: "This is a sample message"
};
MapMessage message = {
content: content
Expand Down
32 changes: 16 additions & 16 deletions ballerina/tests/jms_session_dups_ok_ack_tests.bal
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,26 @@ final MessageConsumer queue6Consumer = check createConsumer(dupsOkAckSession, de
isolated function testDupsOkAckWithQueue() returns error? {
MapMessage msg1 = {
content: {
"messageId": 1,
"payload": "This is the first message"
messageId: 1,
payload: "This is the first message"
}
};
MapMessage msg2 = {
content: {
"messageId": 2,
"payload": "This is the second message"
messageId: 2,
payload: "This is the second message"
}
};
MapMessage msg3 = {
content: {
"messageId": 3,
"payload": "This is the third message"
messageId: 3,
payload: "This is the third message"
}
};
MapMessage msg4 = {
content: {
"messageId": 4,
"payload": "This is the fourth message"
messageId: 4,
payload: "This is the fourth message"
}
};
check queue6Producer->send(msg1);
Expand Down Expand Up @@ -90,26 +90,26 @@ final MessageConsumer topic6Consumer = check createConsumer(dupsOkAckSession, de
isolated function testDupsOkAckWithTopic() returns error? {
MapMessage msg1 = {
content: {
"messageId": 1,
"payload": "This is the first message"
messageId: 1,
payload: "This is the first message"
}
};
MapMessage msg2 = {
content: {
"messageId": 2,
"payload": "This is the second message"
messageId: 2,
payload: "This is the second message"
}
};
MapMessage msg3 = {
content: {
"messageId": 3,
"payload": "This is the third message"
messageId: 3,
payload: "This is the third message"
}
};
MapMessage msg4 = {
content: {
"messageId": 4,
"payload": "This is the fourth message"
messageId: 4,
payload: "This is the fourth message"
}
};
check topic6Producer->send(msg1);
Expand Down
8 changes: 4 additions & 4 deletions ballerina/tests/jms_topic_tests.bal
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ isolated function testTopicWithTextMessage() returns error? {
}
isolated function testTopicWithMapMessage() returns error? {
map<anydata> content = {
"user": "John Doe",
"message": "This is a sample message"
user: "John Doe",
message: "This is a sample message"
};
MapMessage message = {
content: content
Expand Down Expand Up @@ -121,8 +121,8 @@ isolated function testTopicWithTextMessageUsingSendTo() returns error? {
}
isolated function testTopicWithMapMessageUsingSendTo() returns error? {
map<anydata> content = {
"user": "John Doe",
"message": "This is a sample message"
user: "John Doe",
message: "This is a sample message"
};
MapMessage message = {
content: content
Expand Down

0 comments on commit 5f114c6

Please sign in to comment.