Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ECSS Services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AcubeSat-OBC
ECSS Services
Commits
0f19f97e
Commit
0f19f97e
authored
6 years ago
by
kongr45gpen
Browse files
Options
Downloads
Patches
Plain Diff
Enrich documentation for the ServiceTests
parent
2ef8e0d3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/Services/ServiceTests.hpp
+16
-3
16 additions, 3 deletions
test/Services/ServiceTests.hpp
with
16 additions
and
3 deletions
test/Services/ServiceTests.hpp
+
16
−
3
View file @
0f19f97e
...
...
@@ -11,14 +11,24 @@
* @todo See if members of this class can be made non-static
*/
class
ServiceTests
{
protected:
/**
* The list of Messages that have been sent as a result of all the processing.
*
* Whenever a Message is sent from anywhere in the code, it is stored in this array. The
* testing code can fetch these Messages using the ServiceTests::get() method.
*/
static
std
::
vector
<
Message
>
queuedMessages
;
/**
* The list of Errors that the ErrorHandler caught
* @var A multimap with keys (ErrorSource, ErrorType) and values of 1
* The list of Errors that the ErrorHandler caught.
*
* Whenever an Error is thrown anywhere in the code, it is collected in the thrownErrors
* array. Then, the user can tests whether or which types of errors were thrown, using
* the ServiceTests::hasNoErrors() and ServiceTests::thrownError() functions.
*
* A multimap with keys (ErrorHandler::ErrorSource, ErrorHandler::ErrorType) and values of `1`.
*
* @todo If errors get more complex, this should hold the complete error information
*/
static
std
::
multimap
<
std
::
pair
<
ErrorHandler
::
ErrorSource
,
uint16_t
>
,
bool
>
thrownErrors
;
...
...
@@ -39,7 +49,7 @@ public:
}
/**
* Add a message to the queue of messages
to
be sent
* Add a message to the queue of messages
having
be
en
sent
*/
static
void
queue
(
const
Message
&
message
)
{
queuedMessages
.
push_back
(
message
);
...
...
@@ -48,6 +58,9 @@ public:
/**
* Add one error to the list of occurred errors.
*
* @note This function will be called automatically by the ErrorHandler, and should not be
* used in tests.
*
* @param errorSource The source of the error.
* @param errorCode The integer code of the error, coming directly from one of the ErrorCode
* enumerations in ErrorHandler.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment