Ejemplo n.º 1
0
        public void TestGetSourceSystem()
        {
            var rootNode     = _xmlConversionsReader.GetRootNode(ConversionXmlHelper.Unit4OracleWriterConversionsXml());
            var sourceSystem = _xmlConversionsReader.GetSourceSystem(rootNode);

            sourceSystem.Should().Be(DatabaseSystemName.Oracle);
        }
Ejemplo n.º 2
0
        public void Initialize(string conversionXml)
        {
            try
            {
                var rootNode = _xmlConversionsReader.GetRootNode(conversionXml);
                FromSystem = _xmlConversionsReader.GetSourceSystem(rootNode);
                ToSystem   = _xmlConversionsReader.GetDestinationSystem(rootNode);
                foreach (XmlNode typeNode in rootNode.ChildNodes)
                {
                    if (typeNode.NodeType == XmlNodeType.Comment)
                    {
                        continue;
                    }

                    var typeDescription = _xmlConversionsReader.GetColumnTypeDescription(typeNode);
                    _types.Add(typeDescription);
                }
            }
            catch (Exception ex)
            {
                if (ex is AColumnTypeException)
                {
                    throw;
                }

                throw new AColumnTypeException("Error when reading conversion XML", ex);
            }
        }