public void PopulateSql_GivenRightFolder_ShouldLoadAllData()
        {
            var provider = new XmlFileSqlDataProvider(new XmlFileSqlReaderOptions
            {
                FolderPath = RightFolderName
            });

            provider.PopulateSql();

            Assert.NotEmpty(provider.SqlValueData);
        }
        public void PopulateSql_GivenWrongFolder_ShouldHasException()
        {
            var provider = new XmlFileSqlDataProvider(new XmlFileSqlReaderOptions
            {
                FolderPath = WrongFolderName
            });

            Assert.ThrowsAny <Exception>(() =>
            {
                provider.PopulateSql();
            });
        }
        public void GetSqlValue_GivenWrongSectionNameAndExistSqlKey_ShouldNoData()
        {
            var provider = new XmlFileSqlDataProvider(new XmlFileSqlReaderOptions
            {
                FolderPath = RightFolderName
            });

            provider.PopulateSql();

            var result   = provider.Get("Test.Query.1", "Wrong-Sub-Demo-Sql");
            var result_g = provider.Get <SqlValue>("Test.Query.1", "Wrong-Sub-Demo-Sql");

            Assert.Null(result);
            Assert.Null(result_g);
        }
        public void GetSqlValue_GivenRightSectionNameAndSqlKey_ShouldHasMatchingData()
        {
            var provider = new XmlFileSqlDataProvider(new XmlFileSqlReaderOptions
            {
                FolderPath = RightFolderName
            });

            provider.PopulateSql();

            var result   = provider.Get("Test.Query.1", "Demo-Sql");
            var result_g = provider.Get <SqlValue>("Test.Query.1", "Demo-Sql");

            Assert.NotNull(result);
            Assert.NotNull(result_g);
        }