|
1 /* |
|
2 * Copyright (c) 2008 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: Unit test |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __UT_CMCCTRANSCODERIMPL_H__ |
|
21 #define __UT_CMCCTRANSCODERIMPL_H__ |
|
22 |
|
23 |
|
24 // EXTERNAL INCLUDES |
|
25 #include <digia/eunit/ceunittestsuiteclass.h> |
|
26 #include <digia/eunit/eunitmacros.h> |
|
27 #include <mmccevents.h> |
|
28 #include <mmcctranscoder.h> |
|
29 |
|
30 // Forward declaration |
|
31 class CMccTranscoderImpl; |
|
32 class CVedMovie; |
|
33 |
|
34 |
|
35 // Next row is to disable warning emerging from EUnit code. |
|
36 // Placement is due to a fact that most test case files |
|
37 // include this file. Directive can be removed when |
|
38 // EUnit is fixed. |
|
39 #pragma warn_illtokenpasting off |
|
40 |
|
41 // CLASS DEFINITION |
|
42 /** |
|
43 * Tester class for CMusCallMonitorBase. |
|
44 * |
|
45 */ |
|
46 |
|
47 NONSHARABLE_CLASS( UT_CMccTranscoderImpl ): public CEUnitTestSuiteClass, |
|
48 public MMccTranscoderObserver |
|
49 { |
|
50 public: |
|
51 //Two phase construction |
|
52 static UT_CMccTranscoderImpl* NewL(); |
|
53 static UT_CMccTranscoderImpl* NewLC(); |
|
54 // Destructor |
|
55 ~UT_CMccTranscoderImpl(); |
|
56 |
|
57 private: // Constructor |
|
58 UT_CMccTranscoderImpl(); |
|
59 void ConstructL(); |
|
60 |
|
61 private: // Test case setup and teardown |
|
62 void SetupL(); |
|
63 void Setup2L(); |
|
64 void Teardown(); |
|
65 |
|
66 private: // from MMccTranscoderObserver |
|
67 |
|
68 void MccTranscoderEventReceived( TMccEvent& aEvent ); |
|
69 |
|
70 private: // helpers |
|
71 void Reset( TInt aError = KErrNone ); |
|
72 |
|
73 private: // Test methdods |
|
74 |
|
75 void UT_CMccTranscoderImpl_RegisterEventObserverL(); |
|
76 void UT_CMccTranscoderImpl_UnregisterEventObserverL(); |
|
77 void UT_CMccTranscoderImpl_TranscodeFileLL(); |
|
78 void UT_CMccTranscoderImpl_CancelTranscodeFileLL(); |
|
79 void UT_CMccTranscoderImpl_NotifyVideoClipAddedL(); |
|
80 void UT_CMccTranscoderImpl_NotifyVideoClipAdded2L(); |
|
81 void UT_CMccTranscoderImpl_NotifyVideoClipAddingFailedL(); |
|
82 void UT_CMccTranscoderImpl_NotifyVideoClipRemovedL(); |
|
83 void UT_CMccTranscoderImpl_NotifyMovieQualityChangedL(); |
|
84 void UT_CMccTranscoderImpl_NotifyMovieProcessingStartedLL(); |
|
85 void UT_CMccTranscoderImpl_NotifyMovieProcessingProgressedL(); |
|
86 void UT_CMccTranscoderImpl_NotifyMovieProcessingCompletedL(); |
|
87 void UT_CMccTranscoderImpl_NotifyMovieOutputParametersChangedL(); |
|
88 void UT_CMccTranscoderImpl_AsyncTimerExpiredL(); |
|
89 |
|
90 |
|
91 private: // Data |
|
92 CMccTranscoderImpl* iMccTranscoder; |
|
93 |
|
94 CVedMovie* iMovie; |
|
95 |
|
96 TMccTranscodeFileMsg iData; |
|
97 |
|
98 TMccEvent iMccEvent; |
|
99 |
|
100 EUNIT_DECLARE_TEST_TABLE; |
|
101 |
|
102 }; |
|
103 |
|
104 #endif // __UT_CMCCTRANSCODERIMPL_H__ |
|
105 |
|
106 // End of file |