Browse Source

refactoring: changed some variable names in test_showGeneralInfoEmployee.c

remotes/origin/feature/show-general-info-employee
fdai7514 2 years ago
parent
commit
da40d8b28b
  1. 51
      tests/test_showGeneralInfoEmployee.c

51
tests/test_showGeneralInfoEmployee.c

@ -12,51 +12,52 @@ void tearDown(void)
{ {
} }
//eN : employeeName pwd: password
void test1_showGeneralInfoEmployee(void) 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) 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) 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) 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) 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) 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 #endif // TEST
Loading…
Cancel
Save