web_pub/favourites_engine_api/tsrc/src/FavouritesWapApTestCases.cpp
changeset 27 60c5402cb945
parent 8 7c90e6132015
child 29 a758fa0cb043
--- a/web_pub/favourites_engine_api/tsrc/src/FavouritesWapApTestCases.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/web_pub/favourites_engine_api/tsrc/src/FavouritesWapApTestCases.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -1,23 +1,26 @@
 /*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* ============================================================================
+*  Name:      FavouritesWapApTestCases.cpp
+*  Part of:   FavouritesEngineTest class member functions   
+*
+*  Description:
+*
+*  Version:   0.5
 *
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
+*  Copyright (C) 2002 Nokia Corporation.
+*  This material, including documentation and any related 
+*  computer programs, is protected by copyright controlled by 
+*  Nokia Corporation. All rights are reserved. Copying, 
+*  including reproducing, storing,  adapting or translating, any 
+*  or all of this material requires the prior written consent of 
+*  Nokia Corporation. This material also contains confidential 
+*  information which may not be disclosed to others without the 
+*  prior written consent of Nokia Corporation.
 *
-* Description: 
-*
-*
+* ============================================================================
 */
 
 
-
 // INCLUDE FILES
 #include <e32math.h>
 #include "FavouritesEngineTest.h"
@@ -151,6 +154,58 @@
     return KErrNone;
     }
 
+
+/*
+-------------------------------------------------------------------------------
+
+    Class: CFavouritesEngineTest
+
+    Method: WapApAssignSelfWithApTest
+
+    Description: Test the WapAp assign(=) operater using a WapAp as the argument.
+  
+    Parameters:  TTestResult& aErrorDescription: out:   
+                    Test result and on error case a short description of error
+
+    Return Values: TInt: Always KErrNone to indicate that test was valid
+
+    Errors/Exceptions: None
+
+    Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+TInt CFavouritesEngineTest::WapApAssignSelfWithApTest( TTestResult& aResult )
+    {
+    /* Simple server connect */
+    _LIT( KDefinition ,"State");
+    _LIT( KData ,"Test the WapAp assign(=) operater using the same WapAp as the argument");
+    TestModuleIf().Printf( 0, KDefinition, KData );
+
+    TFavouritesWapAp accessPoint1, accessPoint2;
+    
+    accessPoint1 = 222;
+    
+    accessPoint1 = accessPoint1;
+    
+    _LIT( KData2 ,"Finished" );
+    TestModuleIf().Printf( 0, KDefinition, KData2 );
+
+    if(accessPoint1.ApId() == 222)
+        {
+        _LIT( KDescription , "Test case passed");
+        aResult.SetResult( KErrNone, KDescription );
+        }
+    else
+        {
+        _LIT( KDescription , "Test case failed");
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+
+    // Case was executed
+    return KErrNone;
+    }
+
 /*
 -------------------------------------------------------------------------------