void thirdTestCase04(void) { int i; employee* pEmployee; i = 0; pEmployee = findEmployeeById(arrayEmployees, 0, id[i]); utest_assertNullMsg(pEmployee,"Error in return value <addEmployees> if LENGTH of array is invalid, the correct value to return is: (NULL)"); }
void thirdTestCase03(void) { int i; employee* pEmployee; i = 0; pEmployee = findEmployeeById(NULL, LENGTH, id[i]); utest_assertNullMsg(pEmployee,"Error in return value <addEmployees> if array pointer is NULL, the correct value to return is: (NULL)"); }
void thirdTestCase04(void) { int i; employee* pEmployee; i = 0; pEmployee = findEmployeeById(arrayEmployees, 0, id[i]); utest_assertNullMsg(pEmployee,"Error en valor de retorno, si se recibe una logitud erronea [length < 1]\nel valor a retornar es (NULL)"); }
void thirdTestCase03(void) { int i; employee* pEmployee; i = 0; pEmployee = findEmployeeById(NULL, LENGTH, id[i]); utest_assertNullMsg(pEmployee,"Error en valor de retorno, si se recibe un puntero NULL el valor a retornar es (NULL)"); }
void thirdTestCase05(void) { employee* pEmployee; pEmployee = findEmployeeById(arrayEmployees, LENGTH, 1000); utest_assertNullMsg(pEmployee,"Error en valor de retorno, si no se encontro un empleado\nel valor a retornar es (NULL)"); }
void fifthTestCase04(void) { int i; ArrayList* list = NULL; Employee* pAux[LENGTH]; Employee* pAuxGet; list = al_newArrayList(); for(i=0; i < LENGTH; i++) { pAux[i] = newEmployee(id[i],unsortedList[i],unsortedList[i],salary[i],sector[i]); list->add(list,pAux[i]); } pAuxGet = list->get(NULL,0); utest_assertNullMsg(pAuxGet,"Error in return value <get> if the pointer to array is NULL the correct value to return is NULL"); free(list); for(i=0; i < LENGTH; i++) free(pAux[i]); }