os/persistentdata/traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest5step.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/traceservices/tracefw/ulogger/unit_test/te-server/uloggerservertest5step.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,110 @@
     1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +/**
    1.20 + @file UloggerServerTest5Step.cpp
    1.21 + @internalTechnology
    1.22 +*/
    1.23 +#include "uloggerservertest5step.h"
    1.24 +#include "te_uloggerservertestsuitedefs.h"
    1.25 +#include "uloggerdatatypes.h"
    1.26 +
    1.27 +namespace Ulogger
    1.28 +{
    1.29 +
    1.30 +CUloggerServerTest5Step::~CUloggerServerTest5Step()
    1.31 +/**
    1.32 + * Destructor
    1.33 + */
    1.34 +	{
    1.35 +	
    1.36 +	}
    1.37 +
    1.38 +CUloggerServerTest5Step::CUloggerServerTest5Step()
    1.39 +/**
    1.40 + * Constructor
    1.41 + */
    1.42 +	{
    1.43 +	SetTestStepName(KUloggerServerTest5Step);
    1.44 +	}
    1.45 +
    1.46 +TVerdict CUloggerServerTest5Step::doTestStepPreambleL()
    1.47 +/**
    1.48 + * @return - TVerdict code
    1.49 + * Override of base class virtual
    1.50 + */
    1.51 +	{
    1.52 +	INFO_PRINTF1(_L("****This is unit test for CUloggerChannelSettings class****"));	
    1.53 +	iScheduler = new (ELeave) CActiveScheduler();
    1.54 +	CActiveScheduler::Install(iScheduler);
    1.55 +	
    1.56 +
    1.57 +	SetTestStepResult(EPass);
    1.58 +	return TestStepResult();
    1.59 +	}
    1.60 +
    1.61 +
    1.62 +TVerdict CUloggerServerTest5Step::doTestStepL()
    1.63 +/**
    1.64 + * @return - TVerdict code
    1.65 + * Override of base class pure virtual
    1.66 + * Our implementation only gets called if the base class doTestStepPreambleL() did
    1.67 + * not leave. That being the case, the current test result value will be EPass.
    1.68 + */
    1.69 +	{
    1.70 +	  iErrors = 0;
    1.71 +	  if (TestStepResult()==EPass)
    1.72 +	  {
    1.73 +		iErrors += Test1L(); //CControlFramework::StartReading + StopReading
    1.74 +		
    1.75 +		//display results
    1.76 +		TBuf<128> res;
    1.77 +		res.AppendFormat(_L("%d errors"), iErrors);
    1.78 +		INFO_PRINTF1(_L("****Results****"));
    1.79 +		INFO_PRINTF1(res);
    1.80 +		if(iErrors == 0)  
    1.81 +			SetTestStepResult(EPass);
    1.82 +			else
    1.83 +				SetTestStepResult(EFail);
    1.84 +	  }
    1.85 +	  
    1.86 +	  return TestStepResult();
    1.87 +	}
    1.88 +
    1.89 +
    1.90 +
    1.91 +TVerdict CUloggerServerTest5Step::doTestStepPostambleL()
    1.92 +/**
    1.93 + * @return - TVerdict code
    1.94 + * Override of base class virtual
    1.95 + */
    1.96 +	{
    1.97 +	delete iScheduler;
    1.98 +	iScheduler = NULL;
    1.99 +	
   1.100 +	return TestStepResult();
   1.101 +	}
   1.102 +
   1.103 +
   1.104 +
   1.105 +
   1.106 +TInt CUloggerServerTest5Step::Test1L()
   1.107 +	{
   1.108 +	TInt errors = 0;
   1.109 +	
   1.110 +	return errors;
   1.111 +	}
   1.112 +
   1.113 +}