CORDET Framework - C2 Implementation
CrFwInFactoryTestCases.h File Reference

Declaration of the test cases for the InFactory Component (see CrFwInFactory.h). More...

Go to the source code of this file.

Functions

CrFwBool_t CrFwInFactoryTestCase1 ()
 Test the creation and configuration of the InFactory singleton component. More...
 
CrFwBool_t CrFwInFactoryTestCase2 ()
 Test the InCommand creation service in non-nominal situations where the creation fails. More...
 
CrFwBool_t CrFwInFactoryTestCase3 ()
 Test the InCommand part of the Reset and Shutdown functions of the InFactory component. More...
 
CrFwBool_t CrFwInFactoryTestCase4 ()
 Test the InCommand part of the Release function of the InFactory component. More...
 
CrFwBool_t CrFwInFactoryTestCase5 ()
 Test the InReport creation service in non-nominal situations where the creation fails. More...
 
CrFwBool_t CrFwInFactoryTestCase6 ()
 Test the InReport part of the Reset and Shutdown functions of the InFactory component. More...
 
CrFwBool_t CrFwInFactoryTestCase7 ()
 Test the InReport part of the Release function of the InFactory component. More...
 

Detailed Description

Declaration of the test cases for the InFactory Component (see CrFwInFactory.h).

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 CrFwInFactoryTestCases.h.

Function Documentation

CrFwBool_t CrFwInFactoryTestCase1 ( )

Test the creation and configuration of the InFactory singleton component.

The following actions are performed in this test:

  • Create the InFactory singleton twice and check that the same component is returned in both cases.
  • Initialize and configure InFactory and check that it is in state CONFIGURED.
  • Check the correctness of the InFactory component type identifier and instance identifier.
  • Check that the number of allocated InCommands is initially equal to zero
  • Check that the maximum number of InCommands which can be allocated is correct
  • Check that the number of allocated InReports is initially equal to zero
  • Check that the maximum number of InReports which can be allocated is correct
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 44 of file CrFwInFactoryTestCases.c.

CrFwBool_t CrFwInFactoryTestCase2 ( )

Test the InCommand creation service in non-nominal situations where the creation fails.

The following actions are performed in this test:

Verifies:

Application Error: crIllInCmdKind

Application Error: crInCmdAllocationFail

Returns
true if the test was successful, false otherwise.

Definition at line 93 of file CrFwInFactoryTestCases.c.

CrFwBool_t CrFwInFactoryTestCase3 ( )

Test the InCommand part of the Reset and Shutdown functions of the InFactory component.

The following actions are performed in this test:

  • Reset the InFactory and then allocate three InCommands.
  • Check the correct allocation of the instance identifiers of the InCommands.
  • Reset the InFactory and check that no InCommands are any longer allocated.
  • Allocate three InCommands from the InFactory and check that the number of allocated InCommands is three.
  • Shutdown the InFactory and check that no InCommands are any longer allocated.
  • Check the state of the InFactory and then re-start it.
Verifies:

Base SM Transition: CONFIGURED->FPS

Base SM Transition: CONFIGURED->CONFIGURED

Reset Procedure: Configuration Action Successful

Reset Procedure: Configuration Check Successful

Returns
true if the test was successful, false otherwise.

Definition at line 188 of file CrFwInFactoryTestCases.c.

CrFwBool_t CrFwInFactoryTestCase4 ( )

Test the InCommand part of the Release function of the InFactory component.

The following actions are performed in this test:

  • Allocate an InCommand and then release it and check that the number of allocated InCommands is correctly updated.
  • Attempt to release an InCommand twice and check that an application error is raised and that the number of allocated InCommands remains unchanged.
Verifies:
Application Error: crInCmdRelErr
Returns
true if the test was successful, false otherwise.

Definition at line 285 of file CrFwInFactoryTestCases.c.

CrFwBool_t CrFwInFactoryTestCase5 ( )

Test the InReport creation service in non-nominal situations where the creation fails.

The following actions are performed in this test:

Verifies:

Application Error: crIllInRepKind

Application Error: crInRepAllocationFail

Returns
true if the test was successful, false otherwise.

Definition at line 356 of file CrFwInFactoryTestCases.c.

CrFwBool_t CrFwInFactoryTestCase6 ( )

Test the InReport part of the Reset and Shutdown functions of the InFactory component.

The following actions are performed in this test:

  • Reset the InFactory and then allocate three InReports.
  • Reset the InFactory and check that no InReports are any longer allocated.
  • Allocate three InReports from the InFactory and check that the number of allocated InReports is equal to 3.
  • Shutdown the InFactory and check that no InReports are any longer allocated.
  • Check the state of the InFactory and then re-start it.
Verifies:

Base SM Transition: CONFIGURED->FPS

Base SM Transition: CONFIGURED->CONFIGURED

Reset Procedure: Configuration Action Successful

Reset Procedure: Configuration Check Successful

Returns
true if the test was successful, false otherwise.

Definition at line 451 of file CrFwInFactoryTestCases.c.

CrFwBool_t CrFwInFactoryTestCase7 ( )

Test the InReport part of the Release function of the InFactory component.

The following actions are performed in this test:

  • Allocate an InReport and then release it and check that the number of allocated InReports is correctly updated.
  • Attempt to release an InReport twice and check that an application error is raised and that the number of allocated InReports remains unchanged.
Verifies:
Application Error: crInRepRelErr
Returns
true if the test was successful, false otherwise.

Definition at line 547 of file CrFwInFactoryTestCases.c.

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