Simplified doc-site generation
[AGL/documentation.git] / docs / 4_APIs_and_Services / 4.4_AGL_Test_Framework / 5_Reference / 2_BindingAssertFunctions / 2_BindingAssertFunctions.md
diff --git a/docs/4_APIs_and_Services/4.4_AGL_Test_Framework/5_Reference/2_BindingAssertFunctions/2_BindingAssertFunctions.md b/docs/4_APIs_and_Services/4.4_AGL_Test_Framework/5_Reference/2_BindingAssertFunctions/2_BindingAssertFunctions.md
new file mode 100644 (file)
index 0000000..b696555
--- /dev/null
@@ -0,0 +1,79 @@
+---
+edit_link: ''
+title: Binding Assert Functions
+origin_url: >-
+  https://git.automotivelinux.org/apps/app-afb-test/plain/docs/Reference/1_BindingAssertFunctions.md?h=master
+---
+
+<!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/apis_services/master/app-afb-test-developer-guides-api-services-book.yml -->
+
+# 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.assertVerbStatusSkipped(api, verb, args, msg)**
+
+    Skip a test.
+
+    *msg* must contain your test name if you want to parse the output.
+
+* **_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.
+
+    The table has to have this format:
+ ```lua
+    eventGrp = {["api/event_name_1"]=1,["api/event_name_2"]=2,["api/event_name_3"]=5}
+ ```
+    As you can see, in the table, event names are table keys and the value stored are
+    the number of time that the events have to be received.
+
+    Check if events has been correctly received in time (timeout in µs).
+    An event name use the application framework naming scheme: **api/event_name**.