def testGenerateXSDataInputXDSIndexing(self): filename = "XSDataIndexingInput_reference.xml" path = os.path.join(self.dataPath, filename) xmlIndexingInput = EDUtilsTest.readAndParseFile(path) from XSDataMXv1 import XSDataIndexingInput xsDataIndexingInput = XSDataIndexingInput.parseString(xmlIndexingInput) from EDHandlerXSDataXDSv1_0 import EDHandlerXSDataXDSv1_0 xsDataInputXDSIndexing = EDHandlerXSDataXDSv1_0.generateXSDataInputXDSIndexing(xsDataIndexingInput) referenceFilename = "XSDataInputXDSIndexing_reference.xml" referencePath = os.path.join(self.dataPath, referenceFilename) xmlInputXDSIndexingReference = EDUtilsTest.readAndParseFile(referencePath) EDAssert.equal(xmlInputXDSIndexingReference, xsDataInputXDSIndexing.marshal())
def testSetDataInput(self): edPluginControlIndexingv10 = self.createPlugin() xsPluginItemGood01 = self.getPluginConfiguration(os.path.join(self.getPluginTestsDataHome(), "XSConfiguration.xml")) edPluginControlIndexingv10.setConfiguration(xsPluginItemGood01) edPluginControlIndexingv10.configure() xmlInput = self.readAndParseFile(self.__strReferenceInputFile) edPluginControlIndexingv10.setDataInput(xmlInput) xsDataIndexingv01Input = edPluginControlIndexingv10.getDataInput() xsDataIndexingInputReference = XSDataIndexingInput.parseString(xmlInput) EDAssert.equal(xsDataIndexingInputReference.marshal(), xsDataIndexingv01Input.marshal()) self.cleanUp(edPluginControlIndexingv10)
def testGenerateXSDataMOSFLMInputIndexing(self): strFilename = "XSDataIndexingInput_reference.xml" strPath = os.path.join(self.m_strDataPath, strFilename) strXMLIndexingInput = EDUtilsTest.readAndParseFile(strPath) from XSDataMXv1 import XSDataIndexingInput xsDataIndexingInput = XSDataIndexingInput.parseString(strXMLIndexingInput) from EDHandlerXSDataMOSFLMv10 import EDHandlerXSDataMOSFLMv10 xsDataMOSFLMInputIndexing = EDHandlerXSDataMOSFLMv10.generateXSDataMOSFLMInputIndexing(xsDataIndexingInput) xsDataMOSFLMInputIndexing.outputFile("XSDataMOSFLMInputIndexing_reference.xml") strReferenceFilename = "XSDataMOSFLMInputIndexing_reference.xml" strReferencePath = os.path.join(self.m_strDataPath, strReferenceFilename) strXMLMOSFLMInputIndexingReference = EDUtilsTest.readAndParseFile(strReferencePath) EDFactoryPluginStatic.loadModule("XSDataMOSFLMv10") from XSDataMOSFLMv10 import XSDataMOSFLMInputIndexing xsDataMOSFLMInputIndexingReference = XSDataMOSFLMInputIndexing.parseString(strXMLMOSFLMInputIndexingReference) EDAssert.equal(xsDataMOSFLMInputIndexingReference.marshal(), xsDataMOSFLMInputIndexing.marshal())
def testGenerateXSDataInputXDSIndexing(self): filename = "XSDataIndexingInput_reference.xml" path = os.path.join(self.dataPath, filename) xmlIndexingInput = EDUtilsTest.readAndParseFile(path) from XSDataMXv1 import XSDataIndexingInput xsDataIndexingInput = XSDataIndexingInput.parseString(xmlIndexingInput) from EDHandlerXSDataXDSv1_0 import EDHandlerXSDataXDSv1_0 xsDataInputXDSIndexing = EDHandlerXSDataXDSv1_0.generateXSDataInputXDSIndexing( xsDataIndexingInput) referenceFilename = "XSDataInputXDSIndexing_reference.xml" referencePath = os.path.join(self.dataPath, referenceFilename) xmlInputXDSIndexingReference = EDUtilsTest.readAndParseFile( referencePath) EDAssert.equal(xmlInputXDSIndexingReference, xsDataInputXDSIndexing.marshal())
def testSetDataInput(self): edPluginControlIndexingv10 = self.createPlugin() strPathToTestConfigFile = os.path.join(self.getPluginTestsDataHome(), "XSConfiguration.xml") edConfiguration = EDConfiguration(strPathToTestConfigFile) dictItem = edConfiguration.get(edPluginControlIndexingv10.getPluginName()) edPluginControlIndexingv10.setConfig(dictItem) edPluginControlIndexingv10.configure() xmlInput = self.readAndParseFile(self.__strReferenceInputFile) edPluginControlIndexingv10.setDataInput(xmlInput) xsDataIndexingv01Input = edPluginControlIndexingv10.getDataInput() xsDataIndexingInputReference = XSDataIndexingInput.parseString(xmlInput) EDAssert.equal(xsDataIndexingInputReference.marshal(), xsDataIndexingv01Input.marshal()) self.cleanUp(edPluginControlIndexingv10)
def testGenerateXSDataInputXDSIndexing(self): pyStrFilename = "XSDataIndexingInput_reference.xml" pyStrPath = os.path.join(self.m_pyStrDataPath, pyStrFilename) pyStrXMLIndexingInput = self.readAndParseFile(pyStrPath) from XSDataMXv1 import XSDataIndexingInput xsDataIndexingInput = XSDataIndexingInput.parseString(pyStrXMLIndexingInput) from EDHandlerXSDataXDSv1_0 import EDHandlerXSDataXDSv1_0 xsDataInputXDSIndexing = EDHandlerXSDataXDSv1_0.generateXSDataInputXDSIndexing(xsDataIndexingInput) xsDataInputXDSIndexing.outputFile("XSDataInputXDSIndexing_reference.xml") pyStrReferenceFilename = "XSDataInputXDSIndexing_reference.xml" pyStrReferencePath = os.path.join(self.m_pyStrDataPath, pyStrReferenceFilename) xsDataInputXDSIndexing.outputFile("XSDataInputXDSIndexing.xml") pyStrXMLInputXDSIndexingReference = self.readAndParseFile(pyStrReferencePath) EDAssert.equal(pyStrXMLInputXDSIndexingReference, xsDataInputXDSIndexing.marshal())
def testGenerateXSDataInputLabelit(self, _strFileNameXSDataIndexingInput_reference, _strFileNameXSDataLabelitInput_reference): """ This method is testing the generation of the XSDataInputLabelit object given a XSDataIndexingInput object. """ strPath = os.path.join(self.strDataPath, _strFileNameXSDataIndexingInput_reference) strXMLIndexingInput = EDUtilsTest.readAndParseFile(strPath) from XSDataMXv1 import XSDataIndexingInput xsDataIndexingInput = XSDataIndexingInput.parseString(strXMLIndexingInput) from EDHandlerXSDataLabelitv10 import EDHandlerXSDataLabelitv10 xsDataInputLabelit = EDHandlerXSDataLabelitv10.generateXSDataInputLabelit(xsDataIndexingInput) strReferencePath = os.path.join(self.strDataPath, _strFileNameXSDataLabelitInput_reference) strXMLInputLabelitReference = EDUtilsTest.readAndParseFile(strReferencePath) EDFactoryPluginStatic.loadModule("XSDataLabelitv10") from XSDataLabelitv10 import XSDataInputLabelit xsDataInputLabelitReference = XSDataInputLabelit.parseString(strXMLInputLabelitReference) EDAssert.equal(xsDataInputLabelitReference.marshal(), xsDataInputLabelit.marshal())
def testSetDataInput(self): edPluginControlIndexingv10 = self.createPlugin() xsPluginItemGood01 = self.getPluginConfiguration( os.path.join(self.getPluginTestsDataHome(), "XSConfiguration.xml")) edPluginControlIndexingv10.setConfiguration(xsPluginItemGood01) edPluginControlIndexingv10.configure() xmlInput = self.readAndParseFile(self.__strReferenceInputFile) edPluginControlIndexingv10.setDataInput(xmlInput) xsDataIndexingv01Input = edPluginControlIndexingv10.getDataInput() xsDataIndexingInputReference = XSDataIndexingInput.parseString( xmlInput) EDAssert.equal(xsDataIndexingInputReference.marshal(), xsDataIndexingv01Input.marshal()) self.cleanUp(edPluginControlIndexingv10)
def testGenerateXSDataMOSFLMInputIndexing(self): strFilename = "XSDataIndexingInput_reference.xml" strPath = os.path.join(self.m_strDataPath, strFilename) strXMLIndexingInput = EDUtilsTest.readAndParseFile(strPath) from XSDataMXv1 import XSDataIndexingInput xsDataIndexingInput = XSDataIndexingInput.parseString( strXMLIndexingInput) from EDHandlerXSDataMOSFLMv10 import EDHandlerXSDataMOSFLMv10 xsDataMOSFLMInputIndexing = EDHandlerXSDataMOSFLMv10.generateXSDataMOSFLMInputIndexing( xsDataIndexingInput) xsDataMOSFLMInputIndexing.exportToFile( "XSDataMOSFLMInputIndexing_reference.xml") strReferenceFilename = "XSDataMOSFLMInputIndexing_reference.xml" strReferencePath = os.path.join(self.m_strDataPath, strReferenceFilename) strXMLMOSFLMInputIndexingReference = EDUtilsTest.readAndParseFile( strReferencePath) EDFactoryPluginStatic.loadModule("XSDataMOSFLMv10") from XSDataMOSFLMv10 import XSDataMOSFLMInputIndexing xsDataMOSFLMInputIndexingReference = XSDataMOSFLMInputIndexing.parseString( strXMLMOSFLMInputIndexingReference) EDAssert.equal(xsDataMOSFLMInputIndexingReference.marshal(), xsDataMOSFLMInputIndexing.marshal())
def testGenerateXSDataInputXDSIndexing(self): pyStrFilename = "XSDataIndexingInput_reference.xml" pyStrPath = os.path.join(self.m_pyStrDataPath, pyStrFilename) pyStrXMLIndexingInput = self.readAndParseFile(pyStrPath) from XSDataMXv1 import XSDataIndexingInput xsDataIndexingInput = XSDataIndexingInput.parseString( pyStrXMLIndexingInput) from EDHandlerXSDataXDSv1_0 import EDHandlerXSDataXDSv1_0 xsDataInputXDSIndexing = EDHandlerXSDataXDSv1_0.generateXSDataInputXDSIndexing( xsDataIndexingInput) xsDataInputXDSIndexing.exportToFile( "XSDataInputXDSIndexing_reference.xml") pyStrReferenceFilename = "XSDataInputXDSIndexing_reference.xml" pyStrReferencePath = os.path.join(self.m_pyStrDataPath, pyStrReferenceFilename) xsDataInputXDSIndexing.exportToFile("XSDataInputXDSIndexing.xml") pyStrXMLInputXDSIndexingReference = self.readAndParseFile( pyStrReferencePath) EDAssert.equal(pyStrXMLInputXDSIndexingReference, xsDataInputXDSIndexing.marshal())