Skip to content

Commit

Permalink
Fix expected and actual fields in the generated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dilhasha committed Feb 26, 2024
1 parent 47b6f2d commit 53f45bb
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 53f45bb

Please sign in to comment.