datacommsserver/esockserver/test/TS_MultiHoming/TS_ShowConnections.cpp
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // This contains TS_MultiHoming RConnection Stop primitive.
       
    15 // RConnection starts opens and starts a connection, and 
       
    16 // stores this connection in C
       
    17 // 
       
    18 //
       
    19 
       
    20 /**
       
    21  @file
       
    22 */
       
    23  
       
    24 #include "TS_ShowConnections.h"
       
    25 
       
    26 /* 
       
    27  * Test 1.1
       
    28  * Open a default / named connection
       
    29  */
       
    30 CTS_ShowConnections::CTS_ShowConnections()
       
    31 	{
       
    32 	iTestStepName = KShowConnections;
       
    33 	}
       
    34 
       
    35 CTS_ShowConnections::~CTS_ShowConnections()
       
    36 	{	
       
    37 	}
       
    38 
       
    39 enum TVerdict CTS_ShowConnections::doTestStepPreambleL(void)
       
    40 /**
       
    41  * Implements OOM testing in each test
       
    42  */
       
    43 	{
       
    44 	if (!(GetBoolFromConfig(KShowConnections,KOomTest,iIsOOMTest)))
       
    45 		iIsOOMTest=EFalse;
       
    46 	return EPass;
       
    47 	}
       
    48 
       
    49 
       
    50 enum TVerdict CTS_ShowConnections::doTestStepL(void)
       
    51 
       
    52 	{
       
    53 	int expectedNumberOfIfs = 0;
       
    54 	int err = 
       
    55 		GetIntFromConfig(KShowConnections, KExpectedNumberOfIfs, expectedNumberOfIfs);
       
    56 
       
    57 	// No config option so do nothing
       
    58 	if(err == 0)
       
    59 		{
       
    60 		return EInconclusive;
       
    61 		}
       
    62 	
       
    63 	int numberOfInterfaces = iOwnerSuite->DisplayConnectionDetailsL();
       
    64 	// Less than zero is for display purposes only
       
    65 	if(expectedNumberOfIfs < 0 || numberOfInterfaces == expectedNumberOfIfs)
       
    66 		{
       
    67 		return EPass;
       
    68 		}
       
    69 	return EFail;
       
    70 	}
       
    71 
       
    72