From 5ba7c64f538cf72b2f99ee16a999e8b1a468806e Mon Sep 17 00:00:00 2001 From: fdai7207 Date: Wed, 8 Feb 2023 00:59:09 +0100 Subject: [PATCH] correct some logical mistakes in the test_createEmployeeAccount.c file --- src/employeesData.txt | 8 ++++++++ tests/test_createEmployeeAccount.c | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/employeesData.txt b/src/employeesData.txt index 16f8e9a..0169bc0 100644 --- a/src/employeesData.txt +++ b/src/employeesData.txt @@ -32,3 +32,11 @@ Name : Shivam Last name : Chaudhary Adress : Fulda,leipzigerstrasse,6 Phone number : +4918756871384 + + + + + + + + diff --git a/tests/test_createEmployeeAccount.c b/tests/test_createEmployeeAccount.c index f6504b3..d08f64f 100644 --- a/tests/test_createEmployeeAccount.c +++ b/tests/test_createEmployeeAccount.c @@ -194,7 +194,7 @@ void test_validName(void) { /*Arrange*/ - char* validNames[] = {"John","Jane","Fizz","Foo","Atharva","Can","Julius","Haytham","Mohamed","Shivam"}; + char* validNames[] = {"John","Jane","Fizz","Fooo","Atharva","Cahn","Julius","Haytham","Mohamed","Shivam"}; int minimalLength = 4; bool validNamesResult[10]; @@ -209,7 +209,7 @@ void test_validName(void) for(int i = 0;i<10;i++) { - TEST_ASSERT_TRUE(validNames[i]); + TEST_ASSERT_TRUE(validNamesResult[i]); } } @@ -218,7 +218,7 @@ void test_invalidName(void) { /*Arrange*/ - char* invalidNames[] = {"Jo hn","Jane.","Fizz36","Foo8","Ath,arva","C .a1n","Jul132ius","123Haytham",".Mohamed"," Shivam"}; + char* invalidNames[] = {"Jo hn","Jane.","Fizz36","Foo8","Ath,arva","C .a1n","Jul.3ius","H613 aytham","Moh35gta.med","S-+h ivam"}; int minimalLength = 4; bool invalidNamesResult[10];