|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 #ifndef CPIXBOOSTTESTER_H_ |
|
18 #define CPIXBOOSTTESTER_H_ |
|
19 |
|
20 #include "RSearchServerSession.h" |
|
21 |
|
22 class CCPixIndexer; |
|
23 class CCPixSearcher; |
|
24 |
|
25 /* |
|
26 |
|
27 Encapsulates all the tests. |
|
28 |
|
29 Any member function starting 'test' is interpreted as a test to be executed. |
|
30 |
|
31 The tests will be executed in the order they are in this file. |
|
32 |
|
33 Note that the code for the individual tests may be in different CPP files. |
|
34 |
|
35 */ |
|
36 class CTestBoost : public CBase |
|
37 { |
|
38 public: |
|
39 CTestBoost(){} |
|
40 |
|
41 public: |
|
42 |
|
43 void setUp(); |
|
44 void tearDown(); |
|
45 |
|
46 public: |
|
47 |
|
48 void testNoBoost(); |
|
49 |
|
50 void testBoost(); |
|
51 |
|
52 void testFieldBoost(); |
|
53 |
|
54 private: // supporting functionality |
|
55 |
|
56 void AddDocumentL( TInt aId, const TDesC& aContent, TReal aBoost ); |
|
57 void AddDocumentWithFieldBoostL( TInt aId, const TDesC& aContent, TReal aBoost ); |
|
58 void AssertHitDocumentL( TInt aIndex, TInt aId ); |
|
59 |
|
60 private: |
|
61 // CPix database |
|
62 CCPixIndexer* iIndexer; |
|
63 CCPixSearcher* iSearcher; |
|
64 RSearchServerSession iSession; |
|
65 }; |
|
66 #endif /* CPIXBOOSTTESTER_H_ */ |