CORDET Framework - C2 Implementation
CrFwInRegistryTestCases.c File Reference

Implementation of test cases for InRegistry Component. More...

Go to the source code of this file.

Functions

CrFwBool_t CrFwInRegistryTestCase1 ()
 Test the creation and configuration of the InRegistry singleton component. More...
 
CrFwBool_t CrFwInRegistryTestCase2 ()
 Test the ability of the InRegistry to track the state of an incoming command or report. More...
 
CrFwBool_t CrFwInRegistryTestCase3 ()
 Test the shutdown service of the InRegistry. More...
 
CrFwBool_t CrFwInRegistryTestCase4 ()
 Test the reset service of the InRegistry. More...
 

Detailed Description

Implementation of test cases for InRegistry 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

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 CrFwInRegistryTestCases.c.

Function Documentation

◆ CrFwInRegistryTestCase1()

CrFwBool_t CrFwInRegistryTestCase1 ( )

Test the creation and configuration of the InRegistry singleton component.

The following actions are performed in this test:

  • Create the InRegistry singleton twice and check that the same component is returned in both cases.
  • Initialize and configure InRegistry and check that it is in state CONFIGURED.
  • Check the correctness of the InRegistry component type identifier and instance identifier.
Verifies:

Base SM Transition: IPS->CREATED

Base SM Transition: CREATED->INITIALIZED

Base SM Transition: INITIALIZED->CONFIGURED

Initialization Procedure: Initialization Action Successful

Initialization Procedure: Initialization Check Successful

Reset Procedure: Configuration Action Successful

Reset Procedure: Configuration Check Successful

Returns
true if the test was successful, false otherwise.

Definition at line 43 of file CrFwInRegistryTestCases.c.

◆ CrFwInRegistryTestCase2()

CrFwBool_t CrFwInRegistryTestCase2 ( )

Test the ability of the InRegistry to track the state of an incoming command or report.

The following actions are performed in this test:

  • Two InReports and one InCommand are created and the InRegistry is asked to track their state.
  • It is checked that the incoming components are initially reported by the InRegistry to be in state PENDING.
  • The InRegistry is asked to report the state of a non-existent component and it is checked that the correct value is returned by the InRegistry.
  • The state of the InReports is updated and it is checked that the new state is correctly reported by the InRegistry.
  • The state of the InCommand is updated and it is checked that the new state is correctly reported by the InRegistry.
  • One of the InReports is released and then re-created and added again to the InRegistry a total of (CR_FW_INREGISTRY_N) times; it is checked that the other InReport and the InCommand are no longer tracked by the InRegistry.
Returns
true if the test was successful, false otherwise.

Definition at line 85 of file CrFwInRegistryTestCases.c.

◆ CrFwInRegistryTestCase3()

CrFwBool_t CrFwInRegistryTestCase3 ( )

Test the shutdown service of the InRegistry.

The following actions are performed in this test:

  • Three InCommands are created and the InRegistry is asked to track their state.
  • The InRegistry is shutdown and it is checked that InRegistry is STOPPED.
Verifies:
Base SM Transition: CONFIGURED->FPS
Returns
true if the test was successful, false otherwise.

Definition at line 197 of file CrFwInRegistryTestCases.c.

◆ CrFwInRegistryTestCase4()

CrFwBool_t CrFwInRegistryTestCase4 ( )

Test the reset service of the InRegistry.

The following actions are performed in this test:

  • Three OutComponents are created and the InRegistry is asked to track their state.
  • Two services are disabled.
  • The InRegistry is reset and it is checked that the three components are no longer tracked and that the two services are enabled.
Verifies:

Base SM Transition: CONFIGURED->CONFIGURED

Enable State Determination Procedure: Service Type is Enabled

Returns
true if the test was successful, false otherwise.

Definition at line 289 of file CrFwInRegistryTestCases.c.

P&P Software GmbH, Copyright 2012-2013, All Rights Reserved