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

testing for the function DBFindMime() More...

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

Go to the source code of this file.

Functions

int DBFindMimeInit ()
 initialize
 
int DBFindMimeClean ()
 clean the env
 
void testDBFindMime ()
 for function DBFindMime() More...
 

Variables

char * DBConfFile
 DB conf file location.
 
CU_TestInfo testcases_DBFindMime []
 testcases for function DBFindMime More...
 

Detailed Description

testing for the function DBFindMime()

Definition in file testDBFindMime.c.

Function Documentation

◆ testDBFindMime()

void testDBFindMime ( )

for function DBFindMime()

Test:
  1. Create one new entry from mimetype table
  2. Get the mimetype id from DBFindMime() for the inserted type
  3. Check if the value returned from function matches the actual id
  4. Call DBFindMime() on a type which does not exists in DB
  5. Check if -1 is returned

Definition at line 58 of file testDBFindMime.c.

Variable Documentation

◆ testcases_DBFindMime

CU_TestInfo testcases_DBFindMime[]
Initial value:
=
{
{"DBFindMime:ExistAndNot", testDBFindMime},
CU_TEST_INFO_NULL
}
void testDBFindMime()
for function DBFindMime()

testcases for function DBFindMime

Definition at line 143 of file testDBFindMime.c.