|
1 // Copyright (c) 1997-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 // The implementation of the transition validation classes upon the CDefaultLogOutput class methods. |
|
15 // |
|
16 // |
|
17 |
|
18 // ______________________________________________________________________________ |
|
19 // |
|
20 inline TDefaultLogOutput_Ctor_TransitionValidator::TDefaultLogOutput_Ctor_TransitionValidator(CUnitTestContext& aUTContext) |
|
21 :TTransitionValidator(aUTContext) |
|
22 { |
|
23 // Do nothing |
|
24 } |
|
25 |
|
26 inline TBool TDefaultLogOutput_Ctor_TransitionValidator::ValidatePreConditions() |
|
27 { |
|
28 return ETrue; |
|
29 } |
|
30 |
|
31 inline TBool TDefaultLogOutput_Ctor_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) |
|
32 { |
|
33 if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext).iDefaultLogOutput)) |
|
34 return EFalse; |
|
35 return ETrue; |
|
36 } |
|
37 |
|
38 // ______________________________________________________________________________ |
|
39 // |
|
40 inline TDefaultLogOutput_Dtor_TransitionValidator::TDefaultLogOutput_Dtor_TransitionValidator(CUnitTestContext& aUTContext) |
|
41 :TTransitionValidator(aUTContext) |
|
42 { |
|
43 // Do nothing |
|
44 } |
|
45 |
|
46 inline TBool TDefaultLogOutput_Dtor_TransitionValidator::ValidatePreConditions() |
|
47 { |
|
48 if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext).iDefaultLogOutput)) |
|
49 return EFalse; |
|
50 return ETrue; |
|
51 } |
|
52 |
|
53 inline TBool TDefaultLogOutput_Dtor_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) |
|
54 { |
|
55 return ETrue; |
|
56 } |
|
57 |
|
58 // ______________________________________________________________________________ |
|
59 // |
|
60 inline TDefaultLogOutput_Open_TransitionValidator::TDefaultLogOutput_Open_TransitionValidator(CUnitTestContext& aUTContext) |
|
61 :TTransitionValidator(aUTContext) |
|
62 { |
|
63 // Do nothing |
|
64 } |
|
65 |
|
66 inline TBool TDefaultLogOutput_Open_TransitionValidator::ValidatePreConditions() |
|
67 { |
|
68 if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext).iDefaultLogOutput)) |
|
69 return EFalse; |
|
70 return ETrue; |
|
71 } |
|
72 |
|
73 inline TBool TDefaultLogOutput_Open_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) |
|
74 { |
|
75 if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext).iDefaultLogOutput)) |
|
76 return EFalse; |
|
77 return ETrue; |
|
78 } |
|
79 |
|
80 // ______________________________________________________________________________ |
|
81 // |
|
82 inline TDefaultLogOutput_Close_TransitionValidator::TDefaultLogOutput_Close_TransitionValidator(CUnitTestContext& aUTContext) |
|
83 :TTransitionValidator(aUTContext) |
|
84 { |
|
85 // Do nothing |
|
86 } |
|
87 |
|
88 inline TBool TDefaultLogOutput_Close_TransitionValidator::ValidatePreConditions() |
|
89 { |
|
90 if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext).iDefaultLogOutput)) |
|
91 return EFalse; |
|
92 return ETrue; |
|
93 } |
|
94 |
|
95 inline TBool TDefaultLogOutput_Close_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) |
|
96 { |
|
97 if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext).iDefaultLogOutput)) |
|
98 return EFalse; |
|
99 return ETrue; |
|
100 } |
|
101 |
|
102 // ______________________________________________________________________________ |
|
103 // |
|
104 inline TDefaultLogOutput_Write_TransitionValidator::TDefaultLogOutput_Write_TransitionValidator(CUnitTestContext& aUTContext) |
|
105 :TTransitionValidator(aUTContext) |
|
106 { |
|
107 // Do nothing |
|
108 } |
|
109 |
|
110 inline TBool TDefaultLogOutput_Write_TransitionValidator::ValidatePreConditions() |
|
111 { |
|
112 if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext).iDefaultLogOutput)) |
|
113 return EFalse; |
|
114 return ETrue; |
|
115 } |
|
116 |
|
117 inline TBool TDefaultLogOutput_Write_TransitionValidator::ValidatePostConditions(TTestBedAsyncState /* aAsyncState */) |
|
118 { |
|
119 if(iUTContext.StateAccessor().InvariantTest(REINTERPRET_CAST(CDefaultLogOutput_UnitTestContext&,iUTContext).iDefaultLogOutput)) |
|
120 return EFalse; |
|
121 return ETrue; |
|
122 } |