Commit 944ad468 authored by rennoch's avatar rennoch
Browse files

add TC_IMST2_GM_INI_03a

parent 3ff10564
Loading
Loading
Loading
Loading
+120 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ module AtsIms_Gm_TCFunctions {
	import from LibIms_Steps all;
	import from LibIms_SIPTypesAndValues all;
	import from LibIms_Interface all;
	import from LibIms_PIXITS all;
	// AtsIms
	// import from AtsIms_TestSystem all;
	import from AtsIms_PICS all;
@@ -974,6 +975,125 @@ module AtsIms_Gm_TCFunctions {
				f_SIP_postamble_UE2_withoutRegistration();
			} // end function f_Sip_TC_IMST2_GM_INI_03_UE2

			/*
	*  @desc	This is the test case function (SIP originating side - UE1) for TC_IMST2_GM_INI_03a_UE1
	*  @param	p_cSeq_s
	*/
			function f_TC_IMST2_GM_INI_03a_UE1(in CSeq p_cSeq_s)
			runs on ImsComponent {

				var REGISTER_Request v_register;

				v_register :=
					valueof(m_REGISTER_Request_Base(vc_requestUri, vc_callId,
													p_cSeq_s, vc_from, vc_to,
													vc_via_REG, vc_contact,
													vc_authorization));
				// preamble with send REGISTER, await 401, send REGISTER, await
				// 200 OK and user profile setting
				f_IMS_preamble_withRegistration(c_userProfile_UE1atSUThome,
												p_cSeq_s, v_register);
				f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync
				// point
				// preamble
				// done
				// TESTBODY
				// prepare and send INVITE UE2
				// @SUT
				LibIms_Steps
				.f_setHeadersINVITE(p_cSeq_s, c_userProfile_UE2atSUThome);
				f_SendINVITE(m_INVITE_Request_UE(vc_requestUri, vc_callId,
												 p_cSeq_s, vc_from, vc_to,
												 vc_via, vc_contact, omit,
												 vc_route_REG, omit,
												 m_MBody_SDP(vc_sdp_local)));

				// await response - 180 ...
				f_awaitingResponse(mw_Response_PchargingVecFctadrId(c_statusLine180, vc_callId,
													vc_cSeq, omit, omit, omit));

				f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); // sync
				// point
				// test
				// body
				// done
				// POSTAMBLE
				// send CANCEL of REQUEST
				LibIms_Steps.f_setHeadersCANCEL(vc_cSeq,c_userProfile_UE2atSUThome);
				f_SendCANCEL(m_CANCEL_Request_UE(vc_requestUri, vc_callId,
												 p_cSeq_s, vc_from, vc_to,
												 vc_via, vc_route));
				f_awaitingOkResponse(p_cSeq_s);
				// await response - 487
				f_awaitingResponseSendACK(mw_Response_Base(c_statusLine487, vc_callId,
													vc_cSeq));

				// send REGISTER, await 401, send REGISTER, await 200 OK
				f_RemoveRegistration(vc_cSeq); // deregistration in SUT
				f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync
				// point
				// postamble
				// done
				f_SIP_postamble_UE1_withoutRegistration();
			} // end function f_Sip_TC_IMST2_GM_INI_03a_UE1

			/*
	*  @desc	This is the test case function (SIP terminating side - UE2) for TC_IMST2_GM_INI_03a_UE2
	*  @param	loc_CSeq_s
	*/
			function f_TC_IMST2_GM_INI_03a_UE2(in CSeq p_cSeq_s)
			runs on ImsComponent {

				var REGISTER_Request v_register;

				v_register :=
					valueof(m_REGISTER_Request_Base(vc_requestUri, vc_callId,
													p_cSeq_s, vc_from, vc_to,
													vc_via_REG, vc_contact,
													vc_authorization));

				// IMS1 component interface initialization
				f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_PCSCF2);
				// preamble with send REGISTER, await 401, send REGISTER, await
				// 200 OK and user profile setting
				f_IMS_preamble_withRegistration(c_userProfile_UE2atSUThome,
												p_cSeq_s, v_register);

				f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync
				// point
				// preamble
				// done
				// TESTBODY
				// Awaiting INVITE
				f_awaitingINVITE(mw_INVITE_Request_Base);
//				f_sendResponse(m_Response_18XonINVITE_UE(c_statusLine180,
//														 vc_callId, vc_cSeq,
//														 vc_caller_From,
//														 vc_caller_To, vc_via,
//														 vc_contact));
														 
				//send response - 180 with PPreferred header
				f_sendResponse(m_Response_18XonINVITE_pPreferred_UE(c_statusLine180, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, vc_contact, 
										 m_PPreferredID(m_AddrUnion_DisplayAndSipUrl(PX_IMS_SUT_UE2_DISPLAY/*vc_userprofile.publUsername*/, m_SipUrl_currDomain(vc_userprofile)))));			
				
				f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); // sync
				// point
				// test
				// body
				// done
				// POSTAMBLE
				// send REGISTER, await 401, send REGISTER, await 200 OK
				f_RemoveRegistration(vc_cSeq);

				f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync
				// point
				// postamble
				// done
				f_SIP_postamble_UE2_withoutRegistration();
			} // end function f_Sip_TC_IMST2_GM_INI_03a_UE2



			/*
	*  @desc	This is the test case function (SIP originating side - UE1) for TC_IMST2_GM_INI_04_UE1
	*  @param	p_cSeq_s
+22 −0
Original line number Diff line number Diff line
@@ -348,6 +348,28 @@ module AtsIms_Gm_Testcases
		
			} // end TC_IMST2_GM_INI_03
			
			/*
			* @desc TC_IMST2_GM_INI_03a
			* @param p_cSeq_s Transaction Id
			*/
			testcase TC_IMST2_GM_INI_03a(inout CSeq p_cSeq_s) 
			runs on ServerSyncComp
			system TestAdapter {
				//Variables
				var ImsComponent v_imsComponent_ue1, v_imsComponent_ue2;
				f_cf_2GmUp(v_imsComponent_ue1, v_imsComponent_ue2);
		
				//Start
				f_IncCSeq(p_cSeq_s); v_imsComponent_ue1.start(f_TC_IMST2_GM_INI_03a_UE1(p_cSeq_s));
				f_IncCSeq(p_cSeq_s); v_imsComponent_ue2.start(f_TC_IMST2_GM_INI_03a_UE2(p_cSeq_s));
		
				// synchronize both PTCs on 3 sychronization points
				f_serverSync2Clients({c_prDone, c_tbDone, c_poDone});
		
				f_cf_2GmDown(v_imsComponent_ue1, v_imsComponent_ue2);
		
			} // end TC_IMST2_GM_INI_03a
						
			/*
			* @desc TC_IMST2_GM_INI_04
			* @param p_cSeq_s Transaction Id