Implementation of test cases for OutManager component.
More...
Go to the source code of this file.
Implementation of test cases for OutManager component.
- Author
- Vaclav Cechticky vacla.nosp@m.v.ce.nosp@m.chtic.nosp@m.ky@p.nosp@m.np-so.nosp@m.ftwa.nosp@m.re.co.nosp@m.m
-
Alessandro Pasetti paset.nosp@m.ti@p.nosp@m.np-so.nosp@m.ftwa.nosp@m.re.co.nosp@m.m
- Copyright
- P&P Software GmbH, 2013, All Rights Reserved
This file is part of the CORDET Framework.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
For information on alternative licensing, please contact P&P Software GmbH.
Definition in file CrFwOutManagerTestCases.c.
◆ CrFwOutManagerTestCase1()
Check the configuration of a newly created OutManager.
The following actions are performed in this test:
- The first OutManager is created and it is checked that it is in state CREATED.
- The OutManager is initialized and reset and it is checked that in state CONFIGURED.
- The instance identifier and the type identifier of the OutManager is checked.
- It is checked that the POCL is empty and has the expected size.
- It is checked that the counter of loaded OutComponents is equal to zero.
- An attempt is made to create an OutManager with an illegal identifier and it is verified that this results in the application error code being set.
- Verifies:
Base Component SM Transition: IPS->CREATED
Base Component SM Transition: CREATED->INITIALIZED
Base Component SM Transition: INITIALIZED->CONFIGURED
Application Error: crOutManagerIllId
- Returns
- true if the test was successful, false otherwise.
Definition at line 49 of file CrFwOutManagerTestCases.c.
◆ CrFwOutManagerTestCase2()
Check the load function of an OutManager.
The following actions are performed in this test:
- The second OutManager is created, initialized and configured.
- The OutFactory is created, initialized and configured.
- The instance identifier of the OutManager is checked.
- OutComponents are loaded into the OutManager and it is checked that the number of loaded OutComponents is correctly reported.
- When the number of loaded OutComponents exceeds the size of the OutManager's POCL, it is checked that the correct error report is generated.
- The OutManager is reset and it is checked that the POCL is cleared.
- Verifies:
Base Component SM Transition: CONFIGURED->CONFIGURED
OutManager Load Procedure: POCL is full
OutManager Load Procedure: POCL is not full
Error Report: crOutManagerPcrlFull
- Returns
- true if the test was successful, false otherwise.
Definition at line 105 of file CrFwOutManagerTestCases.c.
◆ CrFwOutManagerTestCase3()
Check the execution function of an OutManager with one single OutComponent loaded.
The following actions are performed in this test:
- An OutManager is created, initialized and configured.
- The OutRegistry is created, initialized and configured.
- The OutFactory is created, initialized and configured.
- The empty OutManager is executed twice.
- One instance of the Sample 1 OutComponent is created and it is loaded in the OutManager.
- The Sample OutComponent is configured not to be enabled.
- The OutManager is repeatedly executed and it is checked that the execution is propagated to the OutComponent.
- The Sample OutComponent is configured to be ready but not enabled.
- The OutManager is executed and it is checked that the OutComponent is unloaded and that the OutRegistry correctly tracks its change of state.
- Verifies:
OutManager Execution Procedure: i is smaller or equal to number of items in POCL
OutManager Execution Procedure: i is greater than the number of items in POCL
OutManager Execution Procedure: outCmp is in state PENDING
OutManager Execution Procedure: outCmp is not in state PENDING
OutManager Load Procedure: POCL is not full
- Returns
- true if the test was successful, false otherwise.
Definition at line 196 of file CrFwOutManagerTestCases.c.
◆ CrFwOutManagerTestCase4()
Check the execution function of an OutManager with several OutComponents loaded.
The following actions are performed in this test:
- An OutManager is created, initialized and configured.
- The OutRegistry is created, initialized and configured.
- The OutFactory is created, initialized and configured.
- The first OutStream is created, initialized and configured.
- Two instances of Sample 1 OutComponents and two instances of "standard" OutComponent with default enable and ready checks are created.
- The destination of all OutComponent instances is set to be the same as the destination of the first OutStream (this is important when the OutComponents enter state TERMINATED and need a valid destination).
- The Sample OutComponents are configured to be enabled and not to be ready.
- The OutManager is repeatedly executed and it is checked that the execution is propagated to the OutComponents.
- The Sample OutComponent is configured to be ready but not enabled.
- The OutManager is executed and it is checked that the standard OutComponents are unloaded while the Sample OutComponents remain pending.
- Two more standard OutComponents are loaded in the OutManager and the OutManager is executed once.
- The OutManager is executed and it is checked that the standard OutComponents are unloaded while the Sample OutComponents remain pending.
- It is checked that the OutRegistry correctly tracks the change of state in the OutComponents.
- The OutManager is shutdown and it is checked that all pending OutComponents are released.
- The OutManager is restarted and brought to its CONFIGURED state.
- It is checked that the counter of loaded OutComponents is correctly updated.
- Verifies:
OutManager Execution Procedure: i is smaller or equal to number of items in POCL
OutManager Execution Procedure: i is greater than the number of items in POCL
OutManager Execution Procedure: outCmp is in state PENDING
OutManager Execution Procedure: outCmp is not in state PENDING
OutManager Load Procedure: POCL is not full
- Returns
- true if the test was successful, false otherwise.
Definition at line 315 of file CrFwOutManagerTestCases.c.