CORDET Framework - C2 Implementation
CrFwOutRegistryTestCases.c File Reference

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

Go to the source code of this file.

Functions

CrFwBool_t CrFwOutRegistryTestCase1 ()
 Test the creation and configuration of the OutRegistry singleton component. More...
 
CrFwBool_t CrFwOutRegistryTestCase2 ()
 Test the functions to manipulate the type, sub-type, discriminant and index of an out-going command or report. More...
 
CrFwBool_t CrFwOutRegistryTestCase3 ()
 Test the functions to set and read the enable status of an OutComponent without a discriminant. More...
 
CrFwBool_t CrFwOutRegistryTestCase4 ()
 Test the functions to set and read the enable status of an OutComponent with a discriminant. More...
 
CrFwBool_t CrFwOutRegistryTestCase5 ()
 Test the non-interference of the setting of the enable status for two different discriminant values. More...
 
CrFwBool_t CrFwOutRegistryTestCase6 ()
 Test the response of the OutRegistry to an attempt to disable a non-existent kind of OutComponent. More...
 
CrFwBool_t CrFwOutRegistryTestCase7 ()
 Test the ability of the OutRegistry to track the state of an OutComponent. More...
 
CrFwBool_t CrFwOutRegistryTestCase8 ()
 Test the shutdown service of the OutRegistry. More...
 
CrFwBool_t CrFwOutRegistryTestCase9 ()
 Test the reset service of the OutRegistry. More...
 

Detailed Description

Implementation of test cases for OutRegistry 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 CrFwOutRegistryTestCases.c.

Function Documentation

◆ CrFwOutRegistryTestCase1()

CrFwBool_t CrFwOutRegistryTestCase1 ( )

Test the creation and configuration of the OutRegistry singleton component.

The following actions are performed in this test:

  • Create the OutRegistry singleton twice and check that the same component is returned in both cases.
  • Initialize and configure OutRegistry and check that it is in state CONFIGURED.
  • Check the correctness of the OutRegistry 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 CrFwOutRegistryTestCases.c.

◆ CrFwOutRegistryTestCase2()

CrFwBool_t CrFwOutRegistryTestCase2 ( )

Test the functions to manipulate the type, sub-type, discriminant and index of an out-going command or report.

The following actions are performed in this test:

  • Get the type and sub-type corresponding to a set of index values
  • Get the index value corresponding to several sets of [type, sub-type] pairs
  • Get the lower and upper discriminantn values corresponding to a set of index values
Returns
true if the test was successful, false otherwise.

Definition at line 85 of file CrFwOutRegistryTestCases.c.

◆ CrFwOutRegistryTestCase3()

CrFwBool_t CrFwOutRegistryTestCase3 ( )

Test the functions to set and read the enable status of an OutComponent without a discriminant.

The following actions are performed in this test:

  • An OutComponent is created and it is checked that it is initially enabled
  • The Service Type of the created component is disabled and then it is checked that the OutComponent is disabled.
  • The Service Type of the created component is enabled and its Service Subtype is disabled, and then it is checked that the OutComponent is disabled.
Verifies:

Enable State Determination Procedure: Service Type is Disabled

Enable State Determination Procedure: Service Type is Enabled

Enable State Determination Procedure: Service Sub-Type is Disabled

Enable State Determination Procedure: Service Sub-Type is Enabled

Enable State Determination Procedure: Out-Going Cmd/Rep has no Discriminant

Returns
true if the test was successful, false otherwise.

Definition at line 145 of file CrFwOutRegistryTestCases.c.

◆ CrFwOutRegistryTestCase4()

CrFwBool_t CrFwOutRegistryTestCase4 ( )

Test the functions to set and read the enable status of an OutComponent with a discriminant.

The following actions are performed in this test:

  • An OutComponent is created and it is checked that it is initially enabled
  • The Service Type of the created component is disabled and then it is checked that the OutComponent is disabled.
  • The Service Type of the created component is enabled and its Service Subtype is disabled, and then it is checked that the OutComponent is disabled.
  • The Service Type and Subtype of the created component are enabled, its discriminant is disabled, and then i is checked that the OutComponent is disabled.
Verifies:

Enable State Determination Procedure: Service Type is Disabled

Enable State Determination Procedure: Service Type is Enabled

Enable State Determination Procedure: Service Sub-Type is Disabled

Enable State Determination Procedure: Service Sub-Type is Enabled

Enable State Determination Procedure: Out-Going Cmd/Rep has Discriminant

Enable State Determination Procedure: Discriminant is Disabled

Enable State Determination Procedure: Discriminant is Enabled

Returns
true if the test was successful, false otherwise.

Definition at line 223 of file CrFwOutRegistryTestCases.c.

◆ CrFwOutRegistryTestCase5()

CrFwBool_t CrFwOutRegistryTestCase5 ( )

Test the non-interference of the setting of the enable status for two different discriminant values.

The following actions are performed in this test:

  • Two OutComponents are created with the same type and sub-type but with different discriminants.
  • The two discriminant values are enabled and disabled individually and it is checked that the enable state of the two OutComponents is correctly reported.
Verifies:

Enable State Determination Procedure: Service Type is Enabled

Enable State Determination Procedure: Service Sub-Type is Enabled

Enable State Determination Procedure: Out-Going Cmd/Rep has Discriminant

Enable State Determination Procedure: Discriminant is Disabled

Enable State Determination Procedure: Discriminant is Enabled

Returns
true if the test was successful, false otherwise.

Definition at line 300 of file CrFwOutRegistryTestCases.c.

◆ CrFwOutRegistryTestCase6()

CrFwBool_t CrFwOutRegistryTestCase6 ( )

Test the response of the OutRegistry to an attempt to disable a non-existent kind of OutComponent.

The following actions are performed in this test:

  • An attempt is made to disable a non-existent service type and it is checked the application error code is set.
  • An attempt is made to disable a non-existent service sub-type and it is checked the application error code is set.
  • An attempt is made to disable a non-existent discriminant and it is checked the application error code is set.
Returns
true if the test was successful, false otherwise.

Definition at line 400 of file CrFwOutRegistryTestCases.c.

◆ CrFwOutRegistryTestCase7()

CrFwBool_t CrFwOutRegistryTestCase7 ( )

Test the ability of the OutRegistry to track the state of an OutComponent.

The following actions are performed in this test:

  • Three OutComponents are created and the OutRegistry is asked to track their state.
  • It is checked that the OutComponent are initially reported by the OutRegistry to be in state PENDING.
  • The OutRegistry is asked to report the state of a non-existent OutComponent and it is checked that the correct value is returned by the OutRegistry.
  • The state of the OutComponent is updated and it is checked that the new state is correctly reported by the OutRegistry.
  • One of the OutComponents is released and then re-created and added again to the OutRegistry a total of (CR_FW_OUTREGISTRY_N) times; it is checked that the other two OutComponents are no longer tracked by the OutRegistry.
Verifies:

Registry Start Tracking Procedure: Branch "Registry is Not Full"

Registry Start Tracking Procedure: Branch "Registry is Full"

Registry Update Procedure: Branch "Component is being tracked in Registry"

Registry Update Procedure: Branch "Component is not being tracked in Registry"

Returns
true if the test was successful, false otherwise.

Definition at line 450 of file CrFwOutRegistryTestCases.c.

◆ CrFwOutRegistryTestCase8()

CrFwBool_t CrFwOutRegistryTestCase8 ( )

Test the shutdown service of the OutRegistry.

The following actions are performed in this test:

  • Three OutComponents are created and the OutRegistry is asked to track their state.
  • Two services are disabled.
  • The OutRegistry is shutdown and it is checked that OutRegistry is STOPPED.
Verifies:

Base SM Transition: CONFIGURED->FPS

Enable State Determination Procedure: Service Type is Enabled

Returns
true if the test was successful, false otherwise.

Definition at line 545 of file CrFwOutRegistryTestCases.c.

◆ CrFwOutRegistryTestCase9()

CrFwBool_t CrFwOutRegistryTestCase9 ( )

Test the reset service of the OutRegistry.

The following actions are performed in this test:

  • Three OutComponents are created and the OutRegistry is asked to track their state.
  • Two services are disabled.
  • The OutRegistry 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 636 of file CrFwOutRegistryTestCases.c.

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