Пример #1
0
        public void TestGetDestinationSystem()
        {
            var rootNode     = _xmlConversionsReader.GetRootNode(ConversionXmlHelper.Unit4OracleWriterConversionsXml());
            var sourceSystem = _xmlConversionsReader.GetDestinationSystem(rootNode);

            sourceSystem.Should().Be(DatabaseSystemName.ACopy);
        }
Пример #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);
            }
        }