From 53f45bbd2bf940ec6d0af2a72b38791cfc817ca0 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 31ce10dfbb64..833646911fb4 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 @@ -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 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!"); }