public void finds_files_with_specific_build_action(string dteVersion)
        {
            try
            {
                Init(dteVersion);

                var files =
                    new Enumerators.ProjectItemEnumerator().Get(
                        new Enumerators.ProjectEnumerator().Get("{00d1a9c2-b5f0-4af3-8072-f6c62b433612}")
                        .FirstOrDefault(p => p.FileName == "Nested.sqlproj"));
                Assert.IsNotNull(
                    files.FirstOrDefault(p => p.HasBuildAction("PostDeploy") && p.Name == "Script.PostDeploy.sql"));
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                Assert.Fail();
            }
        }
        public void finds_all_files_in_a_project(string dteVersion)
        {
            try
            {
                Init(dteVersion);

                var files =
                    new Enumerators.ProjectItemEnumerator().Get(
                        new Enumerators.ProjectEnumerator().Get("{00d1a9c2-b5f0-4af3-8072-f6c62b433612}")
                        .FirstOrDefault(p => p.FileName == "Nested.sqlproj"));


                Assert.IsNotNull(files.FirstOrDefault(p => p.Name == "Script.Included.sql"));
                Assert.IsNotNull(files.FirstOrDefault(p => p.Name == "Script.NotIncluded.sql"));
                Assert.IsNotNull(files.FirstOrDefault(p => p.Name == "Script.PostDeploy.sql"));
                Assert.IsNotNull(files.FirstOrDefault(p => p.Name == "Script.Predeploy.sql"));
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                Assert.Fail();
            }
        }
Пример #3
0
        public void finds_all_files_in_a_project(string dteVersion)
        {
            try
            {
                Init(dteVersion);

                var files =
                    new Enumerators.ProjectItemEnumerator().Get(
                        new Enumerators.ProjectEnumerator().Get("{00d1a9c2-b5f0-4af3-8072-f6c62b433612}")
                            .FirstOrDefault(p => p.FileName == "Nested.sqlproj"));


                Assert.IsNotNull(files.FirstOrDefault(p => p.Name == "Script.Included.sql"));
                Assert.IsNotNull(files.FirstOrDefault(p => p.Name == "Script.NotIncluded.sql"));
                Assert.IsNotNull(files.FirstOrDefault(p => p.Name == "Script.PostDeploy.sql"));
                Assert.IsNotNull(files.FirstOrDefault(p => p.Name == "Script.Predeploy.sql"));
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                Assert.Fail();
            }
        }
Пример #4
0
        public void finds_files_with_specific_build_action(string dteVersion)
        {
            try
            {
                Init(dteVersion);

                var files =
                    new Enumerators.ProjectItemEnumerator().Get(
                        new Enumerators.ProjectEnumerator().Get("{00d1a9c2-b5f0-4af3-8072-f6c62b433612}")
                            .FirstOrDefault(p => p.FileName == "Nested.sqlproj"));
                Assert.IsNotNull(
                    files.FirstOrDefault(p => p.HasBuildAction("PostDeploy") && p.Name == "Script.PostDeploy.sql"));
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                Assert.Fail();
            }
        }