From da40d8b28bfda6da96690bd1f020d8bc8abaf983 Mon Sep 17 00:00:00 2001 From: fdai7514 Date: Sun, 29 Jan 2023 21:14:08 +0100 Subject: [PATCH] refactoring: changed some variable names in test_showGeneralInfoEmployee.c --- tests/test_showGeneralInfoEmployee.c | 51 ++++++++++++++-------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/tests/test_showGeneralInfoEmployee.c b/tests/test_showGeneralInfoEmployee.c index 468a993..4a58a83 100644 --- a/tests/test_showGeneralInfoEmployee.c +++ b/tests/test_showGeneralInfoEmployee.c @@ -12,51 +12,52 @@ void tearDown(void) { } -//eN : employeeName pwd: password void test1_showGeneralInfoEmployee(void) { - char eN[] = "Atharva"; - char pwd[] = "Atharva"; - int erg = checkUser(eN, pwd); - TEST_ASSERT_EQUAL_INT(1, erg); + char employeeName[] = "Atharva"; //Arrange + char password[] = "Atharva"; + int ergebnis = checkUser(employeeName, password); //Act + TEST_ASSERT_EQUAL_INT(1, ergebnis); //Assert } void test2_showGeneralInfoEmployee(void) { - char eN[] = "Can"; - char pwd[] = "BlooMask"; - int erg = checkUser(eN, pwd); - TEST_ASSERT_EQUAL_INT(2, erg); + char employeeName[] = "Can"; //Arrange + char password[] = "BlooMask"; + int ergebnis = checkUser(employeeName, password); //Act + TEST_ASSERT_EQUAL_INT(2, ergebnis); //Assert } void test3_showGeneralInfoEmployee(void) { - char eN[] = "Haytham"; - char pwd[] = "TimoDL"; - int erg = checkUser(eN, pwd); - TEST_ASSERT_EQUAL_INT(3, erg); + char employeeName[] = "Haytham"; //Arrange + char password[] = "TimoDL"; + int ergebnis = checkUser(employeeName, password); //Act + TEST_ASSERT_EQUAL_INT(3, ergebnis); //Assert } void test4_showGeneralInfoEmployee(void) { - char eN[] = "Julius"; - char pwd[] = "Insertcat"; - int erg = checkUser(eN, pwd); - TEST_ASSERT_EQUAL_INT(4, erg); + char employeeName[] = "Julius"; //Arrange + char password[] = "Insertcat"; + int ergebnis = checkUser(employeeName, password); //Act + TEST_ASSERT_EQUAL_INT(4, ergebnis); //Assert } void test5_showGeneralInfoEmployee(void) { - char eN[] = "Mohamed"; - char pwd[] = "MD"; - int erg = checkUser(eN, pwd); - TEST_ASSERT_EQUAL_INT(5, erg); + char employeeName[] = "Mohamed"; //Arrange + char password[] = "MD"; + int ergebnis = checkUser(employeeName, password); //Act + TEST_ASSERT_EQUAL_INT(5, ergebnis); //Assert } void test6_showGeneralInfoEmployee(void) { - char eN[] = "Shivam"; - char pwd[] = "Schivam007"; - int erg = checkUser(eN, pwd); - TEST_ASSERT_EQUAL_INT(6, erg); + char employeeName[] = "Shivam"; //Arrange + char password[] = "Schivam007"; + int ergebnis = checkUser(employeeName, password); //Act + TEST_ASSERT_EQUAL_INT(6, ergebnis); //Assert } + + #endif // TEST