/******************************************************************************
 * Copyright (c) 2000-2021 Ericsson Telecom AB
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
 *
 * Contributors:
 *   Balasko, Jeno
 *   Hanko, Matyas
 *   Szabados, Kristof
 *   Szabo, Janos Zoltan – initial implementation
 *   Szalai, Gabor
 *
 ******************************************************************************/
module RAW_Test
{
import from SCCP_typedefs all;
import from SCCP_RAW_Samples all;

import from DTAP_typedefs all;
import from DTAP_RAW_Samples all;

type component MyComponent { };

//------------- PDU_SCCP_Unitdata -----------------------

testcase TC_SCCP_01() runs on MyComponent{
	if (SCCPstr01 == enc_PDU_SCCP(valueof(SCCP01))) {setverdict(pass);}
	    else {setverdict(fail);}

	if (SCCPstr01 == enc_PDU_SCCP(dec_PDU_SCCP(SCCPstr01))) {setverdict(pass);}
	    else {setverdict(fail);}
}

//------------- PDU_SCCP_ConnectionRequest -----------------------

testcase TC_SCCP_02() runs on MyComponent{

	if (SCCPstr02 == enc_PDU_SCCP(valueof(SCCP02))) {setverdict(pass);}
	    else {setverdict(fail);}

	if (SCCPstr02 == enc_PDU_SCCP(dec_PDU_SCCP(SCCPstr02))) {setverdict(pass);}
	    else {setverdict(fail);}

}

//------------- PDU_SCCP_ConnectionConfirm -----------------------

testcase TC_SCCP_03() runs on MyComponent{

	if (SCCPstr03 == enc_PDU_SCCP(valueof(SCCP03))) {setverdict(pass);}
	    else {setverdict(fail);}

	if (SCCPstr03 == enc_PDU_SCCP(dec_PDU_SCCP(SCCPstr03))) {setverdict(pass);}
	    else {setverdict(fail);}

}

//------------- PDU_SCCP_DataForm1 -------------------------------

testcase TC_SCCP_04() runs on MyComponent{

	if (SCCPstr04 == enc_PDU_SCCP(valueof(SCCP04))) {setverdict(pass);}
	    else {setverdict(fail);}

	if (SCCPstr04 == enc_PDU_SCCP(dec_PDU_SCCP(SCCPstr04))) {setverdict(pass);}
	    else {setverdict(fail);}

}

//------------- PDU_SCCP_Released --------------------------------

testcase TC_SCCP_05() runs on MyComponent{

	if (SCCPstr05 == enc_PDU_SCCP(valueof(SCCP05))) {setverdict(pass);}
	    else {setverdict(fail);}

	if (SCCPstr05 == enc_PDU_SCCP(dec_PDU_SCCP(SCCPstr05))) {setverdict(pass);}
	    else {setverdict(fail);}

}

//------------- PDU_DTAP_LocationUpdateRequest -------------------

testcase TC_DTAP_01() runs on MyComponent{

	if (DTAPstr01 == enc_PDU_DTAP_MS_MSC(valueof(DTAP01))) {setverdict(pass);}
	    else {setverdict(fail);}

	if (DTAPstr01 == enc_PDU_DTAP_MS_MSC(dec_PDU_DTAP_MS_MSC(DTAPstr01))) {setverdict(pass);}
	    else {setverdict(fail);}
}

//------------- PDU_DTAP_LocationUpdateAccept -------------------

testcase TC_DTAP_02() runs on MyComponent{

	if (DTAPstr02 == enc_PDU_DTAP_MS_MSC(valueof(DTAP02))) {setverdict(pass);}
	    else {setverdict(fail);}

	if (DTAPstr02 == enc_PDU_DTAP_MS_MSC(dec_PDU_DTAP_MS_MSC(DTAPstr02))) {setverdict(pass);}
	    else {setverdict(fail);}

}

//------------- PDU_DTAP_CallProceeding -------------------------

testcase TC_DTAP_03() runs on MyComponent{

	if (DTAPstr03 == enc_PDU_DTAP_MS_MSC(valueof(DTAP03))) {setverdict(pass);}
	    else {setverdict(fail);}

	if (DTAPstr03 == enc_PDU_DTAP_MS_MSC(dec_PDU_DTAP_MS_MSC(DTAPstr03))) {setverdict(pass);}
	    else {setverdict(fail);}

}

//------------- PDU_DTAP_Alerting_MSC_MS ------------------------
// Note! enc_PDU_DTAP_MSC_MS is being used instead of enc_PDU_DTAP_MS_MSC

testcase TC_DTAP_04() runs on MyComponent{

	if (DTAPstr04 == enc_PDU_DTAP_MSC_MS(valueof(DTAP04))) {setverdict(pass);}
	    else {setverdict(fail);}

	if (DTAPstr04 == enc_PDU_DTAP_MSC_MS(dec_PDU_DTAP_MSC_MS(DTAPstr04))) {setverdict(pass);}
	    else {setverdict(fail);}

}

//------------- PDU_DTAP_Connect_MSC_MS ------------------------
// Note! enc_PDU_DTAP_MSC_MS is being used instead of enc_PDU_DTAP_MS_MSC

testcase TC_DTAP_05() runs on MyComponent{

	if (DTAPstr05 == enc_PDU_DTAP_MSC_MS(valueof(DTAP05))) {setverdict(pass);}
	    else {setverdict(fail);}

	if (DTAPstr05 == enc_PDU_DTAP_MSC_MS(dec_PDU_DTAP_MSC_MS(DTAPstr05))) {setverdict(pass);}
	    else {setverdict(fail);}
}

//------------- PDU_DTAP_ConnectAck -------------------------

testcase TC_DTAP_06() runs on MyComponent{

	if (DTAPstr06 == enc_PDU_DTAP_MS_MSC(valueof(DTAP06))) {setverdict(pass);}
	    else {setverdict(fail);}

	if (DTAPstr06 == enc_PDU_DTAP_MS_MSC(dec_PDU_DTAP_MS_MSC(DTAPstr06))) {setverdict(pass);}
	    else {setverdict(fail);}
}

//------------- PDU_DTAP_Disconnect_MSC_MS ------------------------
// Note! enc_PDU_DTAP_MSC_MS is being used instead of enc_PDU_DTAP_MS_MSC

testcase TC_DTAP_07() runs on MyComponent{

	if (DTAPstr07 == enc_PDU_DTAP_MSC_MS(valueof(DTAP07))) {setverdict(pass);}
	    else {setverdict(fail);}

	if (DTAPstr07 == enc_PDU_DTAP_MSC_MS(dec_PDU_DTAP_MSC_MS(DTAPstr07))) {setverdict(pass);}
	    else {setverdict(fail);}
}

//------------- PDU_DTAP_Release_MS_MSC -------------------------

testcase TC_DTAP_08() runs on MyComponent{

	if (DTAPstr08 == enc_PDU_DTAP_MS_MSC(valueof(DTAP08))) {setverdict(pass);}
	    else {setverdict(fail);}

	if (DTAPstr08 == enc_PDU_DTAP_MS_MSC(dec_PDU_DTAP_MS_MSC(DTAPstr08))) {setverdict(pass);}
	    else {setverdict(fail);}
}

//------------- PDU_DTAP_Disconnect_MSC_MS ------------------------
// Note! enc_PDU_DTAP_MSC_MS is being used instead of enc_PDU_DTAP_MS_MSC

testcase TC_DTAP_09() runs on MyComponent{

	if (DTAPstr09 == enc_PDU_DTAP_MSC_MS(valueof(DTAP09))) {setverdict(pass);}
	    else {setverdict(fail);}

	if (DTAPstr09 == enc_PDU_DTAP_MSC_MS(dec_PDU_DTAP_MSC_MS(DTAPstr09))) {setverdict(pass);}
	    else {setverdict(fail);}
}

control {

	execute (TC_SCCP_01());
	execute (TC_SCCP_02());
	execute (TC_SCCP_03());
	execute (TC_SCCP_04());
	execute (TC_SCCP_05());

	execute (TC_DTAP_01());
	execute (TC_DTAP_02());
	execute (TC_DTAP_03());
	execute (TC_DTAP_04());
	execute (TC_DTAP_05());
	execute (TC_DTAP_06());
	execute (TC_DTAP_07());
	execute (TC_DTAP_08());
	execute (TC_DTAP_09());

}
}

