1 /* 2 * Copyright (C) 2012 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 * use this file except in compliance with the License. You may obtain a copy of 6 * the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 * License for the specific language governing permissions and limitations under 14 * the License. 15 */ 16 17 18 #include "TaskCaseCommon.h" 19 20 class TaskProcessTest : public testing::Test { 21 public: 22 TaskCase* mTestCase; 23 TaskSequential* mSequential; 24 TaskProcess* mProcess; 25 26 27 virtual void SetUp() { 28 TaskGeneric* setup = NULL; 29 TaskGeneric* action = NULL; 30 mTestCase = getTaskCase(setup, action); 31 ASSERT_TRUE(mTestCase != NULL); 32 ASSERT_TRUE(setup != NULL); 33 ASSERT_TRUE(action != NULL); 34 mSequential = new TaskSequential(); 35 const android::String8 REPEAT("repeat"); 36 const android::String8 N_10("10"); 37 const android::String8 INDEX("index"); 38 const android::String8 I("i"); 39 ASSERT_TRUE(mSequential->parseAttribute(REPEAT, N_10)); 40 ASSERT_TRUE(mSequential->parseAttribute(INDEX, I)); 41 ASSERT_TRUE(action->addChild(mSequential)); 42 mProcess = new TaskProcess(); 43 ASSERT_TRUE(mSequential->addChild(mProcess)); 44 45 } 46 47 virtual void TearDown() { 48 delete mTestCase; 49 } 50 }; 51 52 53 TEST_F(TaskProcessTest, AttributeTest) { 54 55 } 56 57 58