From 1955fdce92325c3cdfbf6314dd33697a02349293 Mon Sep 17 00:00:00 2001 From: Fathima Dilhasha Date: Mon, 26 Feb 2024 16:32:40 +0530 Subject: [PATCH] Fix expected and actual fields in the generated tests --- .../resources/create_cmd_templates/lib/tests/lib_test.bal | 4 ++-- .../correctJarPackage/tests/lib_test.bal | 4 ++-- .../uberJarPackage/tests/lib_test.bal | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cli/ballerina-cli/src/main/resources/create_cmd_templates/lib/tests/lib_test.bal b/cli/ballerina-cli/src/main/resources/create_cmd_templates/lib/tests/lib_test.bal index 4b725d91de93..d378fe72c76d 100644 --- a/cli/ballerina-cli/src/main/resources/create_cmd_templates/lib/tests/lib_test.bal +++ b/cli/ballerina-cli/src/main/resources/create_cmd_templates/lib/tests/lib_test.bal @@ -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 @@ -22,7 +22,7 @@ function testFunction() { @test:Config {} function negativeTestFunction() { string welcomeMsg = hello(()); - test:assertEquals("Hello, World!", welcomeMsg); + test:assertEquals(welcomeMsg, "Hello, World!"); } // After Suite Function diff --git a/cli/ballerina-cli/src/test/resources/test-resources/inconsistentConflictedJars/correctJarPackage/tests/lib_test.bal b/cli/ballerina-cli/src/test/resources/test-resources/inconsistentConflictedJars/correctJarPackage/tests/lib_test.bal index bdc58bc72f10..ca909d985097 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/inconsistentConflictedJars/correctJarPackage/tests/lib_test.bal +++ b/cli/ballerina-cli/src/test/resources/test-resources/inconsistentConflictedJars/correctJarPackage/tests/lib_test.bal @@ -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 @@ -15,5 +15,5 @@ function testFunction() { function negativeTestFunction() { string name = ""; string welcomeMsg = hello(name); - test:assertEquals("Hello, World!", welcomeMsg); + test:assertEquals(welcomeMsg, "Hello, World!"); } diff --git a/cli/ballerina-cli/src/test/resources/test-resources/inconsistentConflictedJars/uberJarPackage/tests/lib_test.bal b/cli/ballerina-cli/src/test/resources/test-resources/inconsistentConflictedJars/uberJarPackage/tests/lib_test.bal index bdc58bc72f10..ca909d985097 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/inconsistentConflictedJars/uberJarPackage/tests/lib_test.bal +++ b/cli/ballerina-cli/src/test/resources/test-resources/inconsistentConflictedJars/uberJarPackage/tests/lib_test.bal @@ -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 @@ -15,5 +15,5 @@ function testFunction() { function negativeTestFunction() { string name = ""; string welcomeMsg = hello(name); - test:assertEquals("Hello, World!", welcomeMsg); + test:assertEquals(welcomeMsg, "Hello, World!"); }