00001 00031 #include "create/create.h" 00032 #include "create/types.h" 00033 00034 #include "gtest/gtest.h" 00035 00036 #include <boost/shared_ptr.hpp> 00037 00038 TEST(CreateTest, ConstructorSingleParam) 00039 { 00040 create::Create create_default; 00041 00042 create::Create create_1(create::RobotModel::CREATE_1); 00043 00044 create::Create create_2(create::RobotModel::CREATE_2); 00045 00046 create::Create create_roomba_400(create::RobotModel::ROOMBA_400); 00047 } 00048 00049 // TEST(CreateTest, ConstructorMultiParam) 00050 // { 00051 // TODO(jacobperron): Document exception thrown and consider defining custom exception 00052 // create::Create create(std::string("/dev/ttyUSB0"), 11520); 00053 // } 00054 00055 TEST(CreateTest, Connected) 00056 { 00057 create::Create create; 00058 // Nothing to be connected to 00059 EXPECT_FALSE(create.connected()); 00060 } 00061 00062 TEST(CreateTest, Disconnect) 00063 { 00064 create::Create create; 00065 // Even though not connected, this should not crash 00066 create.disconnect(); 00067 }