def testSetDataInput(self): edPluginControlIntegrationv10 = self.createPlugin() xsPluginItemGood01 = self.getPluginConfiguration(os.path.join(self.getPluginTestsDataHome(), "XSConfiguration.xml")) edPluginControlIntegrationv10.setConfiguration(xsPluginItemGood01) edPluginControlIntegrationv10.configure() xmlInputReference = self.readAndParseFile(self.strReferenceInputFile) from XSDataMXv1 import XSDataIntegrationInput xsDataIntegrationInputReference = XSDataIntegrationInput.parseString(xmlInputReference) edPluginControlIntegrationv10.setDataInput(xmlInputReference) xsDataIntegrationv10Input = edPluginControlIntegrationv10.getDataInput() EDAssert.equal(xsDataIntegrationInputReference.marshal(), xsDataIntegrationv10Input.marshal()) self.cleanUp(edPluginControlIntegrationv10)
def testGenerateXSDataMOSFLMInputIntegration(self): strFilename = "XSDataIntegrationInput_reference.xml" strPath = os.path.join(self.m_strDataPath, strFilename) strXMLIntegrationInput = EDUtilsTest.readAndParseFile(strPath) from XSDataMXv1 import XSDataIntegrationInput xsDataIntegrationInput = XSDataIntegrationInput.parseString(strXMLIntegrationInput) from EDHandlerXSDataMOSFLMv10 import EDHandlerXSDataMOSFLMv10 xsDataMOSFLMInputIntegration = EDHandlerXSDataMOSFLMv10.generateXSDataMOSFLMInputIntegration(xsDataIntegrationInput) strReferenceFilename = "XSDataMOSFLMInputIntegration_reference.xml" strReferencePath = os.path.join(self.m_strDataPath, strReferenceFilename) strXMLIntegrationInputReference = EDUtilsTest.readAndParseFile(strReferencePath) EDFactoryPluginStatic.loadModule("XSDataMOSFLMv10") from XSDataMOSFLMv10 import XSDataMOSFLMInputIntegration xsDataMOSFLMInputIntegrationReference = XSDataMOSFLMInputIntegration.parseString(strXMLIntegrationInputReference) EDAssert.equal(xsDataMOSFLMInputIntegrationReference.marshal(), xsDataMOSFLMInputIntegration.marshal())
def testGenerateXSDataMOSFLMInputIntegration(self): strFilename = "XSDataIntegrationInput_reference.xml" strPath = os.path.join(self.m_strDataPath, strFilename) strXMLIntegrationInput = EDUtilsTest.readAndParseFile(strPath) from XSDataMXv1 import XSDataIntegrationInput xsDataIntegrationInput = XSDataIntegrationInput.parseString( strXMLIntegrationInput) from EDHandlerXSDataMOSFLMv10 import EDHandlerXSDataMOSFLMv10 xsDataMOSFLMInputIntegration = EDHandlerXSDataMOSFLMv10.generateXSDataMOSFLMInputIntegration( xsDataIntegrationInput) strReferenceFilename = "XSDataMOSFLMInputIntegration_reference.xml" strReferencePath = os.path.join(self.m_strDataPath, strReferenceFilename) strXMLIntegrationInputReference = EDUtilsTest.readAndParseFile( strReferencePath) EDFactoryPluginStatic.loadModule("XSDataMOSFLMv10") from XSDataMOSFLMv10 import XSDataMOSFLMInputIntegration xsDataMOSFLMInputIntegrationReference = XSDataMOSFLMInputIntegration.parseString( strXMLIntegrationInputReference) EDAssert.equal(xsDataMOSFLMInputIntegrationReference.marshal(), xsDataMOSFLMInputIntegration.marshal())