00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
#include "../GeneralInclude/CompilerSwitches.h"
00011
#include "../GeneralInclude/ClassId.h"
00012
#include "../GeneralInclude/Constants.h"
00013
#include "../GeneralInclude/TestConstants.h"
00014
#include "../Telecommand/DC_DummyPUSTelecommand.h"
00015
#include "TestCaseDummyPUSTelecommand_1.h"
00016
00017 TestCaseDummyPUSTelecommand_1::TestCaseDummyPUSTelecommand_1(
void) :
00018
TestCaseGenericSetUp(ID_DUMMYPUSTELECOMMAND*10+1,"
TestCaseDummyPUSTelecommand_1") {
00019
return;
00020 }
00021
00022 void TestCaseDummyPUSTelecommand_1::runTestCase(
void) {
00023
00024
00025
DC_DummyPUSTelecommand* pTc =
new DC_DummyPUSTelecommand();
00026
00027
00028
if ( pTc->
getClassId() != ID_DUMMYPUSTELECOMMAND )
00029 { setTestResult(
TEST_FAILURE,
"Wrong class identifier");
00030
return;
00031 }
00032
00033
00034
if ( pTc->
isObjectConfigured() )
00035 { setTestResult(
TEST_FAILURE,
"Wrong configuration status");
00036
return;
00037 }
00038
00039
00040
if ( pTc->
getTelecommandId() !=
TEST_TC_ID )
00041 { setTestResult(
TEST_FAILURE,
"Wrong TC ID value");
00042
return;
00043 }
00044
if ( pTc->
getType() !=
TEST_TC_TYPE )
00045 { setTestResult(
TEST_FAILURE,
"Wrong TC type value");
00046
return;
00047 }
00048
if ( pTc->
getSubType() !=
TEST_TC_SUBTYPE )
00049 { setTestResult(
TEST_FAILURE,
"Wrong TC subtype value");
00050
return;
00051 }
00052
if ( pTc->
getSource() !=
TEST_TC_SOURCE )
00053 { setTestResult(
TEST_FAILURE,
"Wrong TC source value");
00054
return;
00055 }
00056 pTc->
setTimeTag(5);
00057
if ( pTc->
getTimeTag() != 5 )
00058 { setTestResult(
TEST_FAILURE,
"Wrong time tag value");
00059
return;
00060 }
00061
if ( pTc->
getAcknowledgeLevel() != 0 )
00062 { setTestResult(
TEST_FAILURE,
"Wrong TC acknowledge level");
00063
return;
00064 }
00065
if ( pTc->
getPacketId() != (2048+4096+
TEST_TC_APID) )
00066 { setTestResult(
TEST_FAILURE,
"Wrong packet ID");
00067
return;
00068 }
00069
00070
00071
if ( !pTc->
isObjectConfigured() )
00072 { setTestResult(
TEST_FAILURE,
"Wrong configuration status");
00073
return;
00074 }
00075
00076
00077 pTc->
setAcknowledgeLevel(10);
00078
if ( pTc->
isAcceptanceAckRequired() )
00079 { setTestResult(
TEST_FAILURE,
"Wrong acceptance acknowledge value");
00080
return;
00081 }
00082
if ( !pTc->
isStartAckRequired() )
00083 { setTestResult(
TEST_FAILURE,
"Wrong start acknowledge value");
00084
return;
00085 }
00086
if ( pTc->
isProgressAckRequired() )
00087 { setTestResult(
TEST_FAILURE,
"Wrong progress acknowledge value");
00088
return;
00089 }
00090
if ( !pTc->
isCompletionAckRequired() )
00091 { setTestResult(
TEST_FAILURE,
"Wrong completion acknowledge value");
00092
return;
00093 }
00094
00095
00096 pTc->
execute();
00097 pTc->
execute();
00098
if ( pTc->
getExecutionCounter() != 2 )
00099 { setTestResult(
TEST_FAILURE,
"Wrong execution check counter value");
00100
return;
00101 }
00102
00103 setTestResult(
TEST_SUCCESS,
"Test Successful");
00104
return;
00105
00106 }