def testCorrectGetNodeHierarchyAsList(self):
     fbx_file_path = os.path.join(os.getcwd(),'GarageAssemblyUtilities','GarageChecker','tests','visibilityTest.fbx')
     node = GetRootNodeFromFBXFile(fbx_file_path)
     #Check return files based on Root Node
     self.failUnlessEqual(GetNodeHierarchyAsList(node,0),[u'RootNode',u'carParent', u'test1', u'pCube2', u'test2', u'pCube1'])
     #Check return of Child Node
     self.failUnlessEqual(GetNodeHierarchyAsList(node.GetChild(0),0),[u'carParent', u'test1', u'pCube2', u'test2', u'pCube1'])
 def testFailUnlessRaisesGetSceneHierarchyAsList(self):
     fbx_file_path = os.path.join(os.getcwd(),'GarageAssemblyUtilities','GarageChecker','tests','visibilityTest.fbx')
     node = GetRootNodeFromFBXFile(fbx_file_path)
     with self.failUnlessRaises(TypeError):
         GetSceneHierarchyAsList(node)
 def testFailUnlessRaisesValueErrorGetRootNodeFromFBXFile(self):
     fbx_file_path = 'visibility.fbx'
     with self.failUnlessRaises(ValueError): 
         GetRootNodeFromFBXFile(fbx_file_path)
 def testFailUnlessRaisesTypeErrorGetRootNodeFromFBXFile(self):
     fbx_file_path = 1234
     with self.failUnlessRaises(TypeError): 
         GetRootNodeFromFBXFile(fbx_file_path)
 def testCorrectGetRootNodeFromFBXFile(self):
     fbx_file_path = os.path.join(os.getcwd(),'GarageAssemblyUtilities','GarageChecker','tests','visibilityTest.fbx')
     self.failUnlessEqual(type(GetRootNodeFromFBXFile(fbx_file_path)),fbx.FbxNode)
 def testCorrectGetNodeHierarchyAsListByVisibilityOff(self):
     fbx_file_path = os.path.join(os.getcwd(),'GarageAssemblyUtilities','GarageChecker','tests','visibilityTest.fbx')
     node = GetRootNodeFromFBXFile(fbx_file_path)
     #Check that you return the test files Hierarchy based on Visible = 0
     self.failUnlessEqual(GetNodeHierarchyAsListByVisibility(node,0,0.0),[u'test2'])
 def testCorrectGetNodeHierarchyAsListByVisibility(self):
     fbx_file_path = os.path.join(os.getcwd(),'GarageAssemblyUtilities','GarageChecker','tests','visibilityTest.fbx')
     node = GetRootNodeFromFBXFile(fbx_file_path)
     #Check that you return the test files Hierarchy based Visible = 1
     self.failUnlessEqual(GetNodeHierarchyAsListByVisibility(node,0,1.0),[u'RootNode', u'carParent', u'test1', u'pCube2', u'pCube1'])