telephonyserverplugins/common_tsy/test/integration/src/comparisonfunctions.cpp
author Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
Wed, 02 Jun 2010 16:33:50 +0100
branchopencode
changeset 32 58332560b319
parent 24 6638e7f4bd8f
permissions -rw-r--r--
Bring opencode branch up-to-date with latest cellularsrv changes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
     1
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
     2
// All rights reserved.
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
     3
// This component and the accompanying materials are made available
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
     5
// which accompanies this distribution, and is available
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
     7
//
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
     8
// Initial Contributors:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
     9
// Nokia Corporation - initial contribution.
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    10
//
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    11
// Contributors:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    12
//
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    13
// Description:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    14
//
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    15
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    16
#include "comparisonfunctions.h"
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    17
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    18
TCmpRCallTCallInfo::TCmpRCallTCallInfo
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    19
	(RCall::TCallInfo& aExpected, RCall::TCallInfo& aValue, CCTSYIntegrationTestSuiteStepBase& aTestStep)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    20
	: TCmpBase<RCall::TCallInfo>(aExpected, aValue, aTestStep)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    21
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    22
	}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    23
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    24
TBool TCmpRCallTCallInfo::IsEqual(TLogError aLogError)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    25
/**
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    26
 * Check that all the parameters in RCall::TCallInfo are identical.
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    27
 */
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    28
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    29
	if (iExpected.iCallName == iValue.iCallName &&
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    30
		iExpected.iLineName == iValue.iLineName &&
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    31
		iExpected.iHookStatus == iValue.iHookStatus &&
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    32
		iExpected.iDuration == iValue.iDuration)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    33
		{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    34
		return ETrue;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    35
		}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    36
	else
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    37
		{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    38
		if(aLogError == ELogError)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    39
			{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    40
			_LIT(KAssertRCallErrorEqualsTextA,"FAILURE");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    41
			_LIT(KAssertRCallErrorEqualsTextB," Got callname=%S,linename=%S,hookstatus=%d,duration=%d");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    42
			_LIT(KAssertRCallErrorEqualsTextC," Expected callname=%S,linename=%S,hookstatus=%d,duration=%d");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    43
			ERR_PRINTF1(KAssertRCallErrorEqualsTextA);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    44
			ERR_PRINTF5(KAssertRCallErrorEqualsTextB, &iExpected.iCallName, &iExpected.iLineName, iExpected.iHookStatus, iExpected.iDuration.Int() );
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    45
			ERR_PRINTF5(KAssertRCallErrorEqualsTextC, &iValue.iCallName, &iValue.iLineName, iValue.iHookStatus, iValue.iDuration.Int() );	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    46
			}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    47
		return EFalse;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    48
		}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    49
	}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    50
	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    51
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    52
TCmpRCallTCallInfoNoHookValidName::TCmpRCallTCallInfoNoHookValidName
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    53
	(RCall::TCallInfo& aExpected, RCall::TCallInfo& aValue, CCTSYIntegrationTestSuiteStepBase& aTestStep)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    54
	: TCmpBase<RCall::TCallInfo>(aExpected, aValue, aTestStep)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    55
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    56
	}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    57
	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    58
TBool TCmpRCallTCallInfoNoHookValidName::IsEqual(TLogError aLogError)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    59
/**
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    60
 * Check that the call name and line name are not empty,
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    61
 * call status is correct and duration is > 0.
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    62
 */
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    63
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    64
	if(iExpected.iCallName.Length() > 0 &&
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    65
			iExpected.iLineName.Length() > 0 &&
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    66
			iExpected.iStatus == iValue.iStatus &&
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    67
			iExpected.iDuration.Int() > 0)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    68
		{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    69
		return ETrue;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    70
		}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    71
	else
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    72
		{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    73
		if(aLogError == ELogError)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    74
			{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    75
			_LIT(KAssertRCallErrorEqualsTextA,"FAILURE");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    76
			_LIT(KAssertRCallErrorEqualsTextB," Got callname=%S,linename=%S,status=%d,duration=%d");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    77
			_LIT(KAssertRCallErrorEqualsTextC," Expected callname=%S,linename=%S,status=%d,duration=%d");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    78
			ERR_PRINTF1(KAssertRCallErrorEqualsTextA);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    79
			ERR_PRINTF5(KAssertRCallErrorEqualsTextB, &iExpected.iCallName, &iExpected.iLineName, iExpected.iStatus, iExpected.iDuration.Int() );
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    80
			ERR_PRINTF5(KAssertRCallErrorEqualsTextC, &iValue.iCallName, &iValue.iLineName, iValue.iStatus, iValue.iDuration.Int() );	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    81
			}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    82
		return EFalse;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    83
		}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    84
	}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    85
	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    86
TCmpRMobileCallTMobileCallCaps::TCmpRMobileCallTMobileCallCaps
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    87
	(RMobileCall::TMobileCallCapsV1& aExpected, RMobileCall::TMobileCallCapsV1& aValue, CCTSYIntegrationTestSuiteStepBase& aTestStep)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    88
	: TCmpBase<RMobileCall::TMobileCallCapsV1>(aExpected, aValue, aTestStep)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    89
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    90
	}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    91
	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    92
TBool TCmpRMobileCallTMobileCallCaps::IsEqual(TLogError aLogError)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    93
/**
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    94
 * Check that the Call Control Caps and Call Event Caps flags are are as expected,
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    95
 */
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    96
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    97
	if((  (iValue.iCallControlCaps & iExpected.iCallControlCaps) == iExpected.iCallControlCaps) &&
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    98
		( (iValue.iCallEventCaps & iExpected.iCallEventCaps) == iExpected.iCallEventCaps))
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
    99
		{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   100
		return ETrue;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   101
		}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   102
	else
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   103
		{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   104
		if(aLogError == ELogError)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   105
			{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   106
			_LIT(KAssertRCallErrorEqualsTextA,"FAILURE");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   107
			_LIT(KAssertRCallErrorEqualsTextB," Got CallControlCaps=0x%x,CallEventCaps=0x%x");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   108
			_LIT(KAssertRCallErrorEqualsTextC," Expected CallControlCaps=0x%x,CallEventCaps=0x%x");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   109
			ERR_PRINTF1(KAssertRCallErrorEqualsTextA);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   110
			ERR_PRINTF3(KAssertRCallErrorEqualsTextB, iValue.iCallControlCaps, iValue.iCallEventCaps);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   111
			ERR_PRINTF3(KAssertRCallErrorEqualsTextC, iExpected.iCallControlCaps, iExpected.iCallEventCaps);	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   112
			}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   113
		return EFalse;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   114
		}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   115
			
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   116
			
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   117
		
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   118
	}	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   119
	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   120
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   121
TCmpRMobileCallTMobileCallRemotePartyInfo::TCmpRMobileCallTMobileCallRemotePartyInfo
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   122
	(RMobileCall::TMobileCallRemotePartyInfoV1& aExpected, RMobileCall::TMobileCallRemotePartyInfoV1& aValue, CCTSYIntegrationTestSuiteStepBase& aTestStep)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   123
	: TCmpBase<RMobileCall::TMobileCallRemotePartyInfoV1>(aExpected, aValue, aTestStep)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   124
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   125
	}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   126
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   127
	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   128
TBool TCmpRMobileCallTMobileCallRemotePartyInfo::IsEqual(TLogError aLogError)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   129
/**
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   130
 * Check that the Direction and Remote Number flags are are as expected,
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   131
 */
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   132
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   133
	if(( iValue.iDirection == iExpected.iDirection) &&
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   134
		(iValue.iRemoteNumber.iTelNumber == iExpected.iRemoteNumber.iTelNumber) )
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   135
		{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   136
		return ETrue;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   137
		}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   138
	else
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   139
		{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   140
		if(aLogError == ELogError)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   141
			{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   142
			_LIT(KAssertRCallErrorEqualsTextA,"FAILURE");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   143
			_LIT(KAssertRCallErrorEqualsTextB," Got Direction=%X,Remote Number=%X");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   144
			_LIT(KAssertRCallErrorEqualsTextC," Expected Direction=%X,Remote Number=%X");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   145
			ERR_PRINTF1(KAssertRCallErrorEqualsTextA);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   146
			ERR_PRINTF3(KAssertRCallErrorEqualsTextB, &iValue.iDirection, &iValue.iRemoteNumber.iTelNumber);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   147
			ERR_PRINTF3(KAssertRCallErrorEqualsTextC,&iExpected.iDirection, &iExpected.iRemoteNumber.iTelNumber);	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   148
			}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   149
		return EFalse;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   150
		}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   151
	}	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   152
	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   153
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   154
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   155
TCmpTMobilePhoneLockInfoV1NoStatus::TCmpTMobilePhoneLockInfoV1NoStatus
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   156
(RMobilePhone::TMobilePhoneLockInfoV1& aExpected, RMobilePhone::TMobilePhoneLockInfoV1& aValue, CCTSYIntegrationTestSuiteStepBase& aTestStep)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   157
: TCmpBase<RMobilePhone::TMobilePhoneLockInfoV1>(aExpected, aValue, aTestStep)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   158
{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   159
}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   160
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   161
TBool TCmpTMobilePhoneLockInfoV1NoStatus::IsEqual(TLogError aLogError)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   162
/**
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   163
* Check that the required parameters in RMobilePhone::TMobilePhoneLockInfoV1 are identical.
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   164
*/
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   165
{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   166
if (iExpected.iSetting == iValue.iSetting
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   167
	 /* && iExpected.iStatus == iValue.iStatus*/)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   168
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   169
	return ETrue;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   170
	}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   171
else
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   172
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   173
	if(aLogError == ELogError)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   174
		{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   175
		_LIT(KAssertRMobilePhoneErrorEqualsTextA,"FAILURE");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   176
		_LIT(KAssertRMobilePhoneErrorEqualsTextB," Got iSetting=%d, iStatus=%d");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   177
		_LIT(KAssertRMobilePhoneErrorEqualsTextC," Expected iSetting=%d, iStatus=%d");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   178
		ERR_PRINTF1(KAssertRMobilePhoneErrorEqualsTextA);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   179
		ERR_PRINTF3(KAssertRMobilePhoneErrorEqualsTextB, iExpected.iSetting,iExpected.iStatus);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   180
		ERR_PRINTF3(KAssertRMobilePhoneErrorEqualsTextC, iValue.iSetting, iValue.iStatus);	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   181
		}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   182
	return EFalse;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   183
	}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   184
}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   185
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   186
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   187
TCmpRPacketContextTContextConfigGPRS::TCmpRPacketContextTContextConfigGPRS
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   188
	(RPacketContext::TContextConfigGPRS& aExpected, RPacketContext::TContextConfigGPRS& aValue, CCTSYIntegrationTestSuiteStepBase& aTestStep)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   189
	: TCmpBase<RPacketContext::TContextConfigGPRS>(aExpected, aValue, aTestStep)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   190
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   191
	}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   192
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   193
TBool TCmpRPacketContextTContextConfigGPRS::IsEqual(TLogError aLogError)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   194
/**
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   195
* Check that the required parameters in RPacketContext::TContextConfigGPRS are identical.
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   196
*/
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   197
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   198
	if(	iExpected.iAccessPointName == iValue.iAccessPointName &&
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   199
		iExpected.iProtocolConfigOption.iAuthInfo.iUsername == iValue.iProtocolConfigOption.iAuthInfo.iUsername &&
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   200
		iExpected.iProtocolConfigOption.iAuthInfo.iPassword == iValue.iProtocolConfigOption.iAuthInfo.iPassword)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   201
		{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   202
		return ETrue;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   203
		}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   204
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   205
	else
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   206
		{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   207
		if(aLogError == ELogError)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   208
			{
32
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   209
			TBuf<255> apn, username, password;
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   210
			apn.Copy(iValue.iAccessPointName);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   211
			username.Copy(iValue.iProtocolConfigOption.iAuthInfo.iUsername);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   212
			password.Copy(iValue.iProtocolConfigOption.iAuthInfo.iPassword);
24
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   213
			_LIT(KAssertRPacketContextErrorEqualsTextA,"FAILURE");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   214
			_LIT(KAssertRPacketContextErrorEqualsTextB," Got apn=%S,username=%S,password=%S");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   215
			_LIT(KAssertRPacketContextErrorEqualsTextC," Expected apn=%S,username=%S,password=%S");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   216
			ERR_PRINTF1(KAssertRPacketContextErrorEqualsTextA);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   217
			ERR_PRINTF4(KAssertRPacketContextErrorEqualsTextB, 
32
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   218
				&apn,
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   219
				&username,
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   220
				&password);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   221
			apn.SetLength(0);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   222
			username.SetLength(0);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   223
			password.SetLength(0);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   224
			apn.Copy(iExpected.iAccessPointName);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   225
			username.Copy(iExpected.iProtocolConfigOption.iAuthInfo.iUsername);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   226
			password.Copy(iExpected.iProtocolConfigOption.iAuthInfo.iPassword);
24
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   227
			ERR_PRINTF4(KAssertRPacketContextErrorEqualsTextC,
32
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   228
				&apn,
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   229
				&username,
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   230
				&password);	
24
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   231
			}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   232
		return EFalse;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   233
		}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   234
	}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   235
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   236
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   237
TCmpRPacketContextTContextConfigR99_R4::TCmpRPacketContextTContextConfigR99_R4
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   238
	(RPacketContext::TContextConfigR99_R4& aExpected, RPacketContext::TContextConfigR99_R4& aValue, CCTSYIntegrationTestSuiteStepBase& aTestStep)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   239
	: TCmpBase<RPacketContext::TContextConfigR99_R4>(aExpected, aValue, aTestStep)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   240
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   241
	}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   242
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   243
TBool TCmpRPacketContextTContextConfigR99_R4::IsEqual(TLogError aLogError)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   244
/**
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   245
* Check that the required parameters in RPacketContext::TContextConfigR99_R4 are identical.
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   246
*/
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   247
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   248
	if(	iExpected.iAccessPointName == iValue.iAccessPointName &&
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   249
		iExpected.iProtocolConfigOption.iAuthInfo.iUsername == iValue.iProtocolConfigOption.iAuthInfo.iUsername &&
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   250
		iExpected.iProtocolConfigOption.iAuthInfo.iPassword == iValue.iProtocolConfigOption.iAuthInfo.iPassword)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   251
		{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   252
		return ETrue;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   253
		}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   254
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   255
	else
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   256
		{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   257
		if(aLogError == ELogError)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   258
			{
32
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   259
			TBuf<255> apn, username, password;
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   260
			apn.Copy(iValue.iAccessPointName);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   261
			username.Copy(iValue.iProtocolConfigOption.iAuthInfo.iUsername);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   262
			password.Copy(iValue.iProtocolConfigOption.iAuthInfo.iPassword);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   263
24
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   264
			_LIT(KAssertRPacketContextErrorEqualsTextA,"FAILURE");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   265
			_LIT(KAssertRPacketContextErrorEqualsTextB," Got apn=%S,username=%S,password=%S");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   266
			_LIT(KAssertRPacketContextErrorEqualsTextC," Expected apn=%S,username=%S,password=%S");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   267
			ERR_PRINTF1(KAssertRPacketContextErrorEqualsTextA);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   268
			ERR_PRINTF4(KAssertRPacketContextErrorEqualsTextB, 
32
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   269
				&apn,
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   270
				&username,
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   271
				&password);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   272
			apn.SetLength(0);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   273
			username.SetLength(0);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   274
			password.SetLength(0);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   275
			apn.Copy(iExpected.iAccessPointName);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   276
			username.Copy(iExpected.iProtocolConfigOption.iAuthInfo.iUsername);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   277
			password.Copy(iExpected.iProtocolConfigOption.iAuthInfo.iPassword);
24
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   278
			ERR_PRINTF4(KAssertRPacketContextErrorEqualsTextC,
32
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   279
				&apn,
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   280
				&username,
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   281
				&password);	
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   282
24
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   283
			}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   284
		return EFalse;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   285
		}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   286
	}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   287
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   288
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   289
TCmpRPacketContextTContextConfig_R5::TCmpRPacketContextTContextConfig_R5
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   290
	(RPacketContext::TContextConfig_R5& aExpected, RPacketContext::TContextConfig_R5& aValue, CCTSYIntegrationTestSuiteStepBase& aTestStep)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   291
	: TCmpBase<RPacketContext::TContextConfig_R5>(aExpected, aValue, aTestStep)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   292
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   293
	}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   294
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   295
TBool TCmpRPacketContextTContextConfig_R5::IsEqual(TLogError aLogError)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   296
/**
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   297
* Check that the required parameters in RPacketContext::TContextConfig_R5 are identical.
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   298
*/
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   299
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   300
	if(	iExpected.iAccessPointName == iValue.iAccessPointName &&
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   301
		iExpected.iProtocolConfigOption.iAuthInfo.iUsername == iValue.iProtocolConfigOption.iAuthInfo.iUsername &&
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   302
		iExpected.iProtocolConfigOption.iAuthInfo.iPassword == iValue.iProtocolConfigOption.iAuthInfo.iPassword)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   303
		{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   304
		return ETrue;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   305
		}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   306
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   307
	else
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   308
		{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   309
		if(aLogError == ELogError)
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   310
			{
32
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   311
			TBuf<255> apn, username, password;
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   312
			apn.Copy(iValue.iAccessPointName);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   313
			username.Copy(iValue.iProtocolConfigOption.iAuthInfo.iUsername);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   314
			password.Copy(iValue.iProtocolConfigOption.iAuthInfo.iPassword);
24
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   315
			_LIT(KAssertRPacketContextErrorEqualsTextA,"FAILURE");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   316
			_LIT(KAssertRPacketContextErrorEqualsTextB," Got apn=%S,username=%S,password=%S");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   317
			_LIT(KAssertRPacketContextErrorEqualsTextC," Expected apn=%S,username=%S,password=%S");
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   318
			ERR_PRINTF1(KAssertRPacketContextErrorEqualsTextA);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   319
			ERR_PRINTF4(KAssertRPacketContextErrorEqualsTextB, 
32
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   320
				&apn,
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   321
				&username,
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   322
				&password);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   323
			apn.SetLength(0);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   324
			username.SetLength(0);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   325
			password.SetLength(0);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   326
			apn.Copy(iExpected.iAccessPointName);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   327
			username.Copy(iExpected.iProtocolConfigOption.iAuthInfo.iUsername);
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   328
			password.Copy(iExpected.iProtocolConfigOption.iAuthInfo.iPassword);
24
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   329
			ERR_PRINTF4(KAssertRPacketContextErrorEqualsTextC,
32
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   330
				&apn,
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   331
				&username,
58332560b319 Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 24
diff changeset
   332
				&password);	
24
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   333
			}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   334
		return EFalse;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   335
		}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   336
	}
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 0
diff changeset
   337