public void should_be_able_to_read_inline_values_from_transformation_configuration()
        {
            //ARRANGE
            const string testFilePath = "test.xml";
            var configurationReader = new TransformConfigurationReader
            {
                FileReader = TextFileReaderTestsHelpers.GetTextFileReaderMock(testFilePath, @"
                            <root>
                                <transformationGroup pattern=""aaa.pattern.xml"">
                                    <transformation output=""output.xml"">
                                        <values>
                                            <Val1>AAA</Val1>
                                        </values>                                    
                                    </transformation>
                                </transformationGroup>
                            </root>")
            };
            var transformConfigurations = configurationReader.ReadFromFile(testFilePath);
            var transformationToTest = transformConfigurations.First();

            //ACT
            var values = transformationToTest.ValuesProvider.GetValues();


            //ASSERT
            Assert.IsNotNull(values);
            Assert.IsTrue(values.ContainsKey("Val1"));
            Assert.AreEqual(values["Val1"], "AAA");
        }  
        private List<TransformConfiguration> GetTransformations()
        {
            if (IsTransformConfigurationFileSpecified())
            {
                var configurationReder = new TransformConfigurationReader();
                return configurationReder.ReadFromFile(TransformConfiguration);

            }
            
            return new List<TransformConfiguration>
            {
                new TransformConfiguration
                {
                    PatternFilePath = PatternFile,
                    OutputFilePath = OutputPath,
                    ValuesProvider = GetValuesProvider()
                }
            };
        }
        public void should_be_able_to_read_many_transformation_for_single_pattern()
        {
            //ARRANGE
            const string testFilePath = "test.xml";
            var configurationReader = new TransformConfigurationReader
            {
                FileReader = TextFileReaderTestsHelpers.GetTextFileReaderMock(testFilePath, @"
                            <root>
                                <transformationGroup pattern=""aaa.pattern.xml"">
                                    <transformation values=""aaa.values.xml"" output=""output.xml"" />
                                    <transformation values=""aaa1.values.xml"" output=""output1.xml"" />
                                </transformationGroup>
                            </root>")
            };

            //ACT
            var result = configurationReader.ReadFromFile(testFilePath);

            //ASSERT
            Assert.IsNotNull(result);
            CollectionAssert.IsNotEmpty(result);
            Assert.AreEqual(2, result.Count);
        }
        public void should_be_able_to_read_post_transformation_from_root_node_configuration()
        {
            //ARRANGE
            const string testFilePath = "test.xml";
            var configurationReader = new TransformConfigurationReader
            {
                FileReader = TextFileReaderTestsHelpers.GetTextFileReaderMock(testFilePath, @"
                            <root>
                                <postTransformations>
                                    <add name=""ReFormatXML"" />
                                </postTransformations>
                                <transformationGroup pattern=""aaa.pattern.xml"">
                                    <transformation values=""aaa.values.xml"" output=""output.xml"" />
                                </transformationGroup>
                            </root>")
            };

            //ACT
            var transformConfigurations = configurationReader.ReadFromFile(testFilePath);


            //ASSERT
            var transformationToTest = transformConfigurations.First();
            Assert.IsNotNull(transformationToTest.PostTransformations);
            Assert.AreEqual(1, transformationToTest.PostTransformations.Count);
            Assert.AreEqual("ReFormatXML", transformationToTest.PostTransformations.First().Name);
        }
        public void should_be_able_to_supress_all_post_transformation_on_lower_level_of_configuration()
        {
            //ARRANGE
            const string testFilePath = "test.xml";
            var configurationReader = new TransformConfigurationReader
            {
                FileReader = TextFileReaderTestsHelpers.GetTextFileReaderMock(testFilePath, @"
                            <root>
                                <postTransformations>
                                    <add name=""StripXMLComments"" />
                                    <add name=""ReFormatXML"" />
                                </postTransformations>
                                <transformationGroup pattern=""aaa.pattern.xml"">
                                    <transformation values=""aaa.values.xml"" output=""output.xml"">
                                        <postTransformations>
                                            <clear />
                                        </postTransformations>
                                    </transformation>
                                </transformationGroup>
                            </root>")
            };

            //ACT
            var transformConfigurations = configurationReader.ReadFromFile(testFilePath);


            //ASSERT
            var transformationToTest = transformConfigurations.First();
            Assert.IsNotNull(transformationToTest.PostTransformations);
            Assert.AreEqual(0, transformationToTest.PostTransformations.Count);
        }