Skip to content

Commit

Permalink
Fx the test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeshLK committed Mar 16, 2023
1 parent 2167b3b commit 95466f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions asb-ballerina/tests/asb_test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ string stringContent = "This is ASB connector test-Message Body";
byte[] byteContent = stringContent.toBytes();
json jsonContent = {name: "wso2", color: "orange", price: 5.36};
byte[] byteContentFromJson = jsonContent.toJsonString().toBytes();
map<any> properties = {a: "propertyValue1", b: "propertyValue2", c: 1, d: "true", f: 1.345, s: false, k:1020202, g: jsonContent};
map<anydata> properties = {a: "propertyValue1", b: "propertyValue2", c: 1, d: "true", f: 1.345, s: false, k:1020202, g: jsonContent};
int timeToLive = 60; // In seconds
int serverWaitTime = 60; // In seconds
int maxMessageCount = 2;
Expand Down Expand Up @@ -94,7 +94,7 @@ function testSendAndReceiveMessageFromQueueOperation() returns error? {
if (messageReceived is Message) {
var result = check messageReceiver->complete(messageReceived);
test:assertEquals(result, (), msg = "Complete message not successful.");
float mapValue = <float> check getApplicationPropertyByName(messageReceived, "f");
float mapValue = check getApplicationPropertyByName(messageReceived, "f").ensureType();
test:assertEquals(mapValue, <float>properties["f"], "Retrieving application properties failed");
} else if (messageReceived is ()) {
test:assertFail("No message in the queue.");
Expand Down

0 comments on commit 95466f7

Please sign in to comment.