FOSSology  4.4.0
Open Source License Compliance by Open Source Software
testDeleteFolders.c File Reference

testing for the function DeleteFolders and DeleteUploads More...

#include <CUnit/CUnit.h>
#include "delagent.h"
#include <string.h>
Include dependency graph for testDeleteFolders.c:

Go to the source code of this file.

Functions

void testDeleteFolders ()
 for function DeleteFolders More...
 
void testDeleteUploads ()
 for function DeleteUploads More...
 

Variables

char * DBConfFile
 DB conf file location.
 
static PGresult * result = NULL
 
CU_TestInfo testcases_DeleteFolders []
 testcases for function Delete More...
 

Detailed Description

testing for the function DeleteFolders and DeleteUploads

Definition in file testDeleteFolders.c.

Function Documentation

◆ testDeleteFolders()

void testDeleteFolders ( )

for function DeleteFolders

Test:
  1. Give a folder id to deleteFolder()
  2. Check for return code

exectue the tested function

Definition at line 26 of file testDeleteFolders.c.

◆ testDeleteUploads()

void testDeleteUploads ( )

for function DeleteUploads

Test:
  1. Delete an upload using deleteUpload() and check for the return
  2. Check if the upload is delete from database
  3. Check if the copyrights for the given upload is also deleted

exectue the tested function

Check false input

Definition at line 49 of file testDeleteFolders.c.

Variable Documentation

◆ testcases_DeleteFolders

CU_TestInfo testcases_DeleteFolders[]
Initial value:
=
{
{"Testing the function DeleteFolders:", testDeleteFolders},
{"Testing the function DeleteUploads:", testDeleteUploads},
CU_TEST_INFO_NULL
}
void testDeleteFolders()
for function DeleteFolders
void testDeleteUploads()
for function DeleteUploads

testcases for function Delete

Definition at line 102 of file testDeleteFolders.c.