public void ShouldBeAbleImportProject()
        {
            NPanday.ProjectImporter.Converter.Algorithms.AbstractPomConverter.UseTestingArtifacts(GetTestArtifacts());

            // would be nicer if this could just be a setup check that ran first - if this method weren't a setup itself
            CheckFrameworkVersion();

            Assert.IsNotNull(ProjectImporterTestFixture.SampleProjectsPath, "ProjectImporterTestFixture.SampleProjectsPath must not be null");
            Assert.IsNotNull(SolutionFileRelativePath, "SolutionFileRelativePath must not be null");

            string solutionFile = Path.Combine(ProjectImporterTestFixture.SampleProjectsPath, SolutionFileRelativePath);

            try
            {
                string warnMsg = string.Empty;
                generatedPomFiles = NPandayImporter.ImportProject(solutionFile, "test.group", "test-parent", "1.2.3-SNAPSHOT", string.Empty, false, UseMsDeploy, SelectedConfiguration, CloudConfiguration, DepSearchConfig, ref warnMsg);
            }
            catch (Exception e)
            {
                Assert.Fail(
                    "\n\n*******************************************\n"
                    + string.Format(
                        "There is an error in importing {0}",
                        SolutionFileRelativePath
                        )

                    + "\n\n*******************************************\n"
                    + e
                    );
            }
        }
示例#2
0
        public void TestProjectImporterWithOutNunitAndUncheckedTestProject()
        {
            Assert.IsNotNull(ProjectImporterTestFixture.SampleProjectsPath, "ProjectImporterTestFixture.SampleProjectsPath must not be null");
            string slnFile = Path.Combine(ProjectImporterTestFixture.SampleProjectsPath, @"MavenTestProjectWithoutNUnit\MavenTestProjectWithoutNUnit.sln");

            string[] generatedPoms = NPandayImporter.ImportProject(slnFile, "test", "test-plugin", "1.0", "", UncheckedProject, ref warnMsg);

            Assert.IsNotNull(generatedPoms);
            Assert.AreEqual(2, generatedPoms.Length);
            Assert.IsFalse(ContainsMavenTestPlugin(generatedPoms[1]));
        }
示例#3
0
 public void TestProjectImporterWithNunitAndCheckedTestProject()
 {
     string[] generatedPoms = null;
     try
     {
         string slnFile = Path.Combine(ProjectImporterTestFixture.SampleProjectsPath, "UnsupportedProjectAboveSolution\\SampleApp\\SampleApp.sln");
         string warnMsg = string.Empty;
         generatedPoms = NPandayImporter.ImportProject(slnFile, "test", "test-plugin", "1.0", "", false, ref warnMsg);
     }
     catch
     {
         Assert.IsNull(generatedPoms);
     }
 }