class SplitterCommand_test(unittest.TestCase):


    def setUp(self):
        self.__toolsDir = os.path.abspath("../../tools") + "/"
        self.__splitterTool = os.path.join(self.__toolsDir, "splitter/lib/splitter.jar")
        self.__splitterCmd = SplitterCommand()
        self.__dataDir = os.path.abspath("../../data") + "/"
        logging.basicConfig(level=logging.DEBUG)


    def tearDown(self):
        pass


    def testsplitAreaIntoTiles(self):
        cmdstr = self.__splitterCmd.splitAreaIntoTiles(self.__dataDir + "temp.osm")
        expectedStr = "java -Xmx2000M -jar " + self.__splitterTool + \
                      " --mapid=${MAPID}0001 --max-nodes=800000 --max-areas=20 " +  self.__dataDir + "temp.osm"
        self.assertEqual(expectedStr, cmdstr,  
                            'SplitterCmd was not composed properly, \nexpected: %s,\nbut was:  %s' % (expectedStr, cmdstr))
 def setUp(self):
     self.__toolsDir = os.path.abspath("../../tools") + "/"
     self.__splitterTool = os.path.join(self.__toolsDir, "splitter/lib/splitter.jar")
     self.__splitterCmd = SplitterCommand()
     self.__dataDir = os.path.abspath("../../data") + "/"
     logging.basicConfig(level=logging.DEBUG)