gmp_tests.c File Reference
`#include "gmp.c"`
`#include <cgreen/cgreen.h>`
`#include <cgreen/mocks.h>`

## Functions

int | __wrap_gvm_server_sendf (gnutls_session_t *session, const char *fmt,...)
int | __wrap_gvm_server_sendf_xml (gnutls_session_t *session, const char *fmt,...)
int | __wrap_gvm_server_sendf_xml_quiet (gnutls_session_t *session, const char *fmt,...)
int | __wrap_read_entity (gnutls_session_t *session, entity_t *entity)
int | __wrap_try_read_entity (gnutls_session_t *session, int timeout, entity_t *entity)
int | __wrap_gvm_connection_sendf (gvm_connection_t *connection, const char *fmt,...)
int | __wrap_gvm_connection_sendf_xml_quiet (gvm_connection_t *connection, const char *fmt,...)
int | __wrap_read_entity_c (gvm_connection_t *connection, entity_t *entity)
int | __wrap_try_read_entity_c (gvm_connection_t *connection, int timeout, entity_t *entity)
| Describe (gmp)
| BeforeEach (gmp)
| AfterEach (gmp)
static entity_t | create_mock_entity (const char *name, const char *text)
static void | add_mock_attribute (entity_t entity, const char *name, const char *value)
| Ensure (gmp, gmp_task_status_returns_correct_string_for_valid_response)
| Ensure (gmp, gmp_task_status_returns_null_when_no_task)
| Ensure (gmp, gmp_task_status_returns_null_when_no_status)
| Ensure (gmp, gmp_read_create_response_returns_uuid_on_success)
| Ensure (gmp, gmp_read_create_response_succeeds_without_uuid_parameter)
| Ensure (gmp, gmp_read_create_response_returns_error_when_no_status)
| Ensure (gmp, gmp_read_create_response_returns_error_on_read_failure)
| Ensure (gmp, gmp_check_response_succeeds_with_valid_response)
| Ensure (gmp, gmp_check_response_returns_gmp_error_code)
| Ensure (gmp, gmp_check_response_returns_error_on_read_failure)
| Ensure (gmp, gmp_check_response_returns_error_when_no_status)
| Ensure (gmp, gmp_ping_succeeds_with_valid_response)
| Ensure (gmp, gmp_ping_returns_error_on_send_failure)
| Ensure (gmp, gmp_ping_returns_error_on_read_failure)
| Ensure (gmp, gmp_ping_returns_error_with_invalid_status)
int | main (int argc, char **argv)

## Function Documentation

## __wrap_gvm_connection_sendf()

int __wrap_gvm_connection_sendf | ( | gvm_connection_t * | connection,
|  | const char * | fmt,
|  |  | ... )

## __wrap_gvm_connection_sendf_xml_quiet()

int __wrap_gvm_connection_sendf_xml_quiet | ( | gvm_connection_t * | connection,
|  | const char * | fmt,
|  |  | ... )

## __wrap_gvm_server_sendf()

int __wrap_gvm_server_sendf | ( | gnutls_session_t * | session,
|  | const char * | fmt,
|  |  | ... )

## __wrap_gvm_server_sendf_xml()

int __wrap_gvm_server_sendf_xml | ( | gnutls_session_t * | session,
|  | const char * | fmt,
|  |  | ... )

## __wrap_gvm_server_sendf_xml_quiet()

int __wrap_gvm_server_sendf_xml_quiet | ( | gnutls_session_t * | session,
|  | const char * | fmt,
|  |  | ... )

## __wrap_read_entity()

int __wrap_read_entity | ( | gnutls_session_t * | session,
|  | entity_t * | entity )

## __wrap_read_entity_c()

int __wrap_read_entity_c | ( | gvm_connection_t * | connection,
|  | entity_t * | entity )

## __wrap_try_read_entity()

int __wrap_try_read_entity | ( | gnutls_session_t * | session,
|  | int | timeout,
|  | entity_t * | entity )

## __wrap_try_read_entity_c()

int __wrap_try_read_entity_c | ( | gvm_connection_t * | connection,
|  | int | timeout,
|  | entity_t * | entity )

## add_mock_attribute()

void add_mock_attribute | ( | entity_t | entity,
|  | const char * | name,
|  | const char * | value )

static

## AfterEach()

AfterEach | ( | gmp |  | ) |

## BeforeEach()

BeforeEach | ( | gmp |  | ) |

## create_mock_entity()

entity_t create_mock_entity | ( | const char * | name,
|  | const char * | text )

static

## Describe()

Describe | ( | gmp |  | ) |

## Ensure() [1/15]

Ensure | ( | gmp | ,
|  | gmp_check_response_returns_error_on_read_failure | )

## Ensure() [2/15]

Ensure | ( | gmp | ,
|  | gmp_check_response_returns_error_when_no_status | )

## Ensure() [3/15]

Ensure | ( | gmp | ,
|  | gmp_check_response_returns_gmp_error_code | )

## Ensure() [4/15]

Ensure | ( | gmp | ,
|  | gmp_check_response_succeeds_with_valid_response | )

## Ensure() [5/15]

Ensure | ( | gmp | ,
|  | gmp_ping_returns_error_on_read_failure | )

## Ensure() [6/15]

Ensure | ( | gmp | ,
|  | gmp_ping_returns_error_on_send_failure | )

## Ensure() [7/15]

Ensure | ( | gmp | ,
|  | gmp_ping_returns_error_with_invalid_status | )

## Ensure() [8/15]

Ensure | ( | gmp | ,
|  | gmp_ping_succeeds_with_valid_response | )

## Ensure() [9/15]

Ensure | ( | gmp | ,
|  | gmp_read_create_response_returns_error_on_read_failure | )

## Ensure() [10/15]

Ensure | ( | gmp | ,
|  | gmp_read_create_response_returns_error_when_no_status | )

## Ensure() [11/15]

Ensure | ( | gmp | ,
|  | gmp_read_create_response_returns_uuid_on_success | )

## Ensure() [12/15]

Ensure | ( | gmp | ,
|  | gmp_read_create_response_succeeds_without_uuid_parameter | )

## Ensure() [13/15]

Ensure | ( | gmp | ,
|  | gmp_task_status_returns_correct_string_for_valid_response | )

## Ensure() [14/15]

Ensure | ( | gmp | ,
|  | gmp_task_status_returns_null_when_no_status | )

## Ensure() [15/15]

Ensure | ( | gmp | ,
|  | gmp_task_status_returns_null_when_no_task | )

## main()

int main | ( | int | argc,
|  | char ** | argv )