예제 #1
0
 private void globTest(string pattern, int expectedCount)
 {
     var pvc = new PvcCore.Pvc();
     var src = pvc.Source(pattern);
     Assert.DoesNotThrow(() =>
     {
         src.Pipe((streams) =>
         {
             Assert.True(streams.Count() == 2, "Stream count was not " + 2);
             return streams;
         });
     });
 }
예제 #2
0
 public void SourceGlobsRecursiveMatchWithoutExtension()
 {
     var pvc = new PvcCore.Pvc();
     var src = pvc.Source("**/*");
     Assert.DoesNotThrow(() =>
     {
         src.Pipe((streams) =>
         {
             // We put at least 4 files in that should match but assemblies are there too
             Assert.True(streams.Count() > 2);
             return streams;
         });
     });
 }
예제 #3
0
        private void globTest(string pattern, int expectedCount)
        {
            var pvc = new PvcCore.Pvc();
            var src = pvc.Source(pattern);

            Assert.DoesNotThrow(() =>
            {
                src.Pipe((streams) =>
                {
                    Assert.True(streams.Count() == 2, "Stream count was not " + 2);
                    return(streams);
                });
            });
        }
예제 #4
0
        public void SourceGlobsRecursiveMatchWithoutExtension()
        {
            var pvc = new PvcCore.Pvc();
            var src = pvc.Source("**/*");

            Assert.DoesNotThrow(() =>
            {
                src.Pipe((streams) =>
                {
                    // We put at least 4 files in that should match but assemblies are there too
                    Assert.True(streams.Count() > 2);
                    return(streams);
                });
            });
        }
예제 #5
0
        public void CanExecuteSqlScript()
        {
            var pvc = new PvcCore.Pvc();
            var source = pvc.Source("*.sql");

            Assert.DoesNotThrow(() =>
            {
                source.Pipe((sources) =>
                {
                    foreach (var src in sources)
                    {
                        Console.WriteLine(src.StreamName);
                    }

                    Assert.AreEqual(1, sources.Count());

                    return sources;
                });
                source.Pipe(new PvcSql(
                    connectionString: "Data Source=.;Initial Catalog=PVCSandbox;Integrated Security=True",
                    providerName: "MsSql"));
            });
        }