From c96df58a88b60c7501b3c8a758c0277c17088371 Mon Sep 17 00:00:00 2001 From: Corentin Le Gall Date: Thu, 19 Jul 2018 15:57:30 +0200 Subject: Changed doc to GitBook format + added doc -Changed README.md to a complet GitBook doc. -Added explanations about EvtGrpReceived functions. -Corrected mistakes + reduced lines length. Change-Id: I1a077ddf6acb520a9158de658d3c09b12a2029d4 Signed-off-by: Corentin Le Gall --- .../Reference/1_BindingAssertFunctions.md | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 docs/WriteYourTests/Reference/1_BindingAssertFunctions.md (limited to 'docs/WriteYourTests/Reference/1_BindingAssertFunctions.md') diff --git a/docs/WriteYourTests/Reference/1_BindingAssertFunctions.md b/docs/WriteYourTests/Reference/1_BindingAssertFunctions.md new file mode 100644 index 0000000..1202976 --- /dev/null +++ b/docs/WriteYourTests/Reference/1_BindingAssertFunctions.md @@ -0,0 +1,66 @@ +# Binding Assert functions + +* **_AFT.assertVerbStatusSuccess(api, verb, args)** + + Simply test that the call of a verb successfully returns. + +* **_AFT.assertVerbStatusError(api, verb, args)** + + The inverse than above. + +* **_AFT.assertVerbResponseEquals(api, verb, args, expectedResponse)** + + Test that the call of a verb successfully returns and that verb's response + is equals to the *expectedResponse*. + +* **_AFT.assertVerbResponseEqualsError(api, verb, args, expectedResponse)** + + The inverse than above. + +* **_AFT.assertVerbCb(api, verb, args, expectedResponse, callback)** + + Test the call of a verb with a custom callback. From this callback you + will need to make some assertions on what you need (verb JSON return object + content mainly). + + If you don't need to test the response simply specify an empty LUA table. + +* **_AFT.assertVerbCbError(api, verb, args, expectedResponse, callback)** + + Should return success on failure. + +* **_AFT.assertEvtReceived(eventName, timeout)** + + Prior to be able to check that an event has been received, you have to + register the event with the test framework using **_AFT.addEventToMonitor** + function. + + Check if an event has been correctly received in time (timeout in µs). + An event name use the application framework naming scheme: **api/event_name**. + +* **_AFT.assertEvtNotReceived(eventName, timeout)** + + Prior to be able to check that an event has been received, you have to + register the event with the test framework using **_AFT.addEventToMonitor** + function. + + Check if an event has been correctly received in time (timeout in µs). + An event name use the application framework naming scheme: **api/event_name**. + +* **_AFT.assertGrpEvtReceived(eventGrp, timeout)** + + Prior to be able to check that a group of event (a table of event) has been + received, you have to register the event with the test framework using + **_AFT.addEventToMonitor** function. + + Check if events has been correctly received in time (timeout in µs). + An event name use the application framework naming scheme: **api/event_name**. + +* **_AFT.assertGrpEvtNotReceived(eventGrp, timeout)** + + Prior to be able to check that a group of event (a table of event) has not + been received, you have to register the event with the test framework using + **_AFT.addEventToMonitor** function. + + Check if events has not been correctly received in time (timeout in µs). + An event name use the application framework naming scheme: **api/event_name**. \ No newline at end of file -- cgit 1.2.3-korg