Skip to content

Commit

Permalink
Merge pull request #42230 from Dilhasha/2201.7.x
Browse files Browse the repository at this point in the history
[2201.7.x] Fix expected and actual fields in the generated tests
  • Loading branch information
azinneera authored Mar 20, 2024
2 parents 7ed4fd3 + 53f45bb commit 71a014e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function beforeSuiteFunc() {
function testFunction() {
string name = "John";
string welcomeMsg = hello(name);
test:assertEquals("Hello, John", welcomeMsg);
test:assertEquals(welcomeMsg, "Hello, John");
}

// Negative Test function
Expand All @@ -23,7 +23,7 @@ function testFunction() {
function negativeTestFunction() {
string name = "";
string welcomeMsg = hello(name);
test:assertEquals("Hello, World!", welcomeMsg);
test:assertEquals(welcomeMsg, "Hello, World!");
}

// After Suite Function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ballerina/test;
function testFunction() {
string name = "John";
string welcomeMsg = hello(name);
test:assertEquals("Hello, John", welcomeMsg);
test:assertEquals(welcomeMsg, "Hello, John");
}

// Negative Test function
Expand All @@ -15,5 +15,5 @@ function testFunction() {
function negativeTestFunction() {
string name = "";
string welcomeMsg = hello(name);
test:assertEquals("Hello, World!", welcomeMsg);
test:assertEquals(welcomeMsg, "Hello, World!");
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ballerina/test;
function testFunction() {
string name = "John";
string welcomeMsg = hello(name);
test:assertEquals("Hello, John", welcomeMsg);
test:assertEquals(welcomeMsg, "Hello, John");
}

// Negative Test function
Expand All @@ -15,5 +15,5 @@ function testFunction() {
function negativeTestFunction() {
string name = "";
string welcomeMsg = hello(name);
test:assertEquals("Hello, World!", welcomeMsg);
test:assertEquals(welcomeMsg, "Hello, World!");
}

0 comments on commit 71a014e

Please sign in to comment.