Exemplo n.º 1
0
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)");
}
Exemplo n.º 2
0
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)");
}
Exemplo n.º 3
0
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)");
}
Exemplo n.º 4
0
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)");
}
Exemplo n.º 5
0
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)");


}
Exemplo n.º 6
0
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]);
}