Example #1
0
        public void AFilterCanBeAppliedToFilterTheResourceNamesOfFoundScripts2()
        {
            var writer          = new StringWriter();
            var assemblyScanner = new AssemblyScanner(writer, Encoding.UTF8, AssemblyWithEmbeddedScripts(), r => r.Contains(".db.MsSql."));

            var changeScripts = assemblyScanner.GetChangeScripts();

            Assert.IsNotNull(changeScripts, "Change scripts should not be null.");
            Assert.AreEqual(changeScripts.Count, 4, "Only one change script should have been found.");
        }
        public void AFilterCanBeAppliedToFilterTheResourceNamesOfFoundScripts2()
        {
            var writer = new StringWriter();
            var assemblyScanner = new AssemblyScanner(writer, Encoding.UTF8, AssemblyWithEmbeddedScripts(), r => r.Contains(".db.MsSql."));

            var changeScripts = assemblyScanner.GetChangeScripts();

            Assert.IsNotNull(changeScripts, "Change scripts should not be null.");
            Assert.AreEqual(changeScripts.Count, 4, "Only one change script should have been found.");
        }
Example #3
0
        public void AFilterCanBeAppliedToFilterTheResourceNamesOfFoundScripts()
        {
            var writer          = new StringWriter();
            var assemblyScanner = new AssemblyScanner(writer, Encoding.UTF8, AssemblyWithEmbeddedScripts(), r => !r.EndsWith("10.Add Age Column.sql"));

            var changeScripts = assemblyScanner.GetChangeScripts();

            Assert.IsNotNull(changeScripts, "Change scripts should not be null.");
            Assert.Greater(changeScripts.Count, 0, "No change scripts where found.");

            VerifyChangeScript(changeScripts, "2.2.0.0", 8, "8.Create Customer Table.sql");
            VerifyChangeScript(changeScripts, "2.3.0.0", 9, "09.Add Customer Data.sql");
            VerifyScriptNotInTheList(changeScripts, "10.Add Age Column.sql");
        }
Example #4
0
        public void CanReadFilesFromAssembly()
        {
            var writer          = new StringWriter();
            var assemblyScanner = new AssemblyScanner(writer, Encoding.UTF8, AssemblyWithEmbeddedScripts());

            var changeScripts = assemblyScanner.GetChangeScripts();

            Assert.IsNotNull(changeScripts, "Change scripts should not be null.");
            Assert.Greater(changeScripts.Count, 0, "No change scripts where found.");

            VerifyChangeScript(changeScripts, "2.2.0.0", 8, "8.Create Customer Table.sql");
            VerifyChangeScript(changeScripts, "2.3.0.0", 9, "09.Add Customer Data.sql");
            VerifyChangeScript(changeScripts, "2.3.0.0", 10, "10.Add Age Column.sql");
        }
        public void AFilterCanBeAppliedToFilterTheResourceNamesOfFoundScripts()
        {
            var writer = new StringWriter();
            var assemblyScanner = new AssemblyScanner(writer, Encoding.UTF8, AssemblyWithEmbeddedScripts(), r => !r.EndsWith("10.Add Age Column.sql"));

            var changeScripts = assemblyScanner.GetChangeScripts();

            Assert.IsNotNull(changeScripts, "Change scripts should not be null.");
            Assert.Greater(changeScripts.Count, 0, "No change scripts where found.");

            VerifyChangeScript(changeScripts, "2.2.0.0", 8, "8.Create Customer Table.sql");
            VerifyChangeScript(changeScripts, "2.3.0.0", 9, "09.Add Customer Data.sql");
            VerifyScriptNotInTheList(changeScripts, "10.Add Age Column.sql");
        }
        public void CanReadFilesFromAssembly()
        {
            var writer = new StringWriter();
            var assemblyScanner = new AssemblyScanner(writer, Encoding.UTF8, AssemblyWithEmbeddedScripts());

            var changeScripts = assemblyScanner.GetChangeScripts();
            
            Assert.IsNotNull(changeScripts, "Change scripts should not be null.");
            Assert.Greater(changeScripts.Count, 0, "No change scripts where found.");

            VerifyChangeScript(changeScripts, "2.2.0.0", 8, "8.Create Customer Table.sql");
            VerifyChangeScript(changeScripts, "2.3.0.0", 9, "09.Add Customer Data.sql");
            VerifyChangeScript(changeScripts, "2.3.0.0", 10, "10.Add Age Column.sql");
        }