cbsref/telephonyrefplugins/atltsy/integrationtest/src/testltsypktopencontext.cpp
author hgs
Tue, 22 Jun 2010 11:02:32 +0100
changeset 44 8b72faa1200f
permissions -rw-r--r--
201024_02
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     1
// TestLtsyPktOpenContext.cpp
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     2
// Copyright (c) Symbian Software Ltd 2008. All rights reserved.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     3
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     4
// Implementation of the Class CTestLtsyPktOpenContext
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     5
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     6
// 	user include
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     7
#include "TestLtsyPktOpenContext.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     8
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     9
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    10
 * Constructor
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    11
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    12
CTestLtsyPktOpenContext::CTestLtsyPktOpenContext(CTestLtsyModel& aModel)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    13
	:CTestLtsyPktTestStepBase(aModel)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    14
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    15
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    16
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    17
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    18
 * Destructor
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    19
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    20
CTestLtsyPktOpenContext::~CTestLtsyPktOpenContext()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    21
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    22
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    23
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    24
 * It implements the required functionality of the test step.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    25
 * This step will open a shared phone
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    26
 * @return TVerdict - result of the test step
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    27
 * @leave - System wide error codes
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    28
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    29
TVerdict CTestLtsyPktOpenContext::doTestStepL()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    30
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    31
	if(TestStepResult() == EPass)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    32
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    33
		if (!IsOpenedPktService())
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    34
			{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    35
			OpenPacketobject();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    36
			}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    37
    	TRAPD(err,OpenNewContext());
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    38
    	if(err != KErrNone)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    39
    		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    40
    		INFO_PRINTF2(_L("The error was returned %d!! when open Context"),err);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    41
    	    SetTestStepResult(EFail);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    42
    		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    43
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    44
	return TestStepResult();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    45
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    46
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    47
// end of file