Ambition.Testing.TestResponse – ambition Reference Manual
Packages
ambition
Ambition
Testing
TestResponse
request
response
result_content
state
TestResponse
assert_content_is
assert_content_isnt
assert_content_like
assert_content_type_is
assert_content_type_isnt
assert_content_type_like
assert_content_type_unlike
assert_content_unlike
assert_header_is
assert_header_isnt
assert_status_is
assert_status_isnt
TestResponse
Object Hierarchy:
Description:
public
class
TestResponse
:
Object
Response from a Helper.mock_request.
Namespace:
Ambition.Testing
Package:
ambition
Content:
Properties:
public
State
state
{
set
;
get
; }
State object.
public
Request
request
{
get
; }
Request object from State.
public
Response
response
{
get
; }
Response object from State.
public
string
?
result_content
{
get
; }
The rendered content from a response.
Creation methods:
public
TestResponse
()
Methods:
public
void
assert_status_is
(
int
status)
Assert HTTP response status code matches value.
public
void
assert_status_isnt
(
int
status)
Assert HTTP response status code does not match value.
public
void
assert_header_is
(
string
header_name,
string
header_value)
Assert header exists and matches value.
public
void
assert_header_isnt
(
string
header_name,
string
header_value)
Assert header exists and does not match value, or header does not exist.
public
void
assert_content_type_is
(
string
content_type)
Assert Content Type matches value.
public
void
assert_content_type_isnt
(
string
content_type)
Assert Content Type does not match value.
public
void
assert_content_type_like
(
string
content_type_like)
Assert Content Type contains value (case insensitive).
public
void
assert_content_type_unlike
(
string
content_type_like)
Assert Content Type does not contain value (case insensitive).
public
void
assert_content_is
(
string
content)
Assert result content matches value.
public
void
assert_content_isnt
(
string
content)
Assert result content does not match value.
public
void
assert_content_like
(
string
content)
Assert result content contains value (case sensitive).
public
void
assert_content_unlike
(
string
content)
Assert result content does not contain value (case sensitive).
Inherited Members:
All known members inherited from class GLib.Object
@new
newv
new_valist
get_type
get_class
@ref
unref
ref_sink
weak_ref
weak_unref
add_weak_pointer
remove_weak_pointer
@get
@set
get_property
set_property
get_data
set_data
set_data_full
steal_data
get_qdata
set_qdata
set_qdata_full
steal_qdata
freeze_notify
thaw_notify
dispose
constructed
notify_property
connect
disconnect
add_toggle_ref
remove_toggle_ref
bind_property
notify
ref_count