Ejemplo n.º 1
0
 public void FromWebApplication()
 {
     using (new TempResourceFile(this.GetType(), "resources.ClassLibrary1.csproj", @"ClassLibrary1\ClassLibrary1.csproj"))
         using (TempResourceFile file = new TempResourceFile(this.GetType(), "resources.WebApplication1.sln", "WebApplication1.sln"))
         {
             NUnitProject project = NUnitProject.FromVSSolution(Path.GetFullPath(file.Path));
             Assert.AreEqual(2, project.Configs.Count);
             Assert.AreEqual(1, project.Configs["Debug"].Assemblies.Count);
             Assert.AreEqual(1, project.Configs["Release"].Assemblies.Count);
         }
 }
Ejemplo n.º 2
0
        public void FromVSSolution()
        {
            NUnitProject project = NUnitProject.FromVSSolution(GetSamplesPath("samples.sln"));

            Assert.AreEqual(4, project.Configs.Count);
            Assert.AreEqual(3, project.Configs["Debug"].Assemblies.Count);
            Assert.AreEqual(3, project.Configs["Release"].Assemblies.Count);
            Assert.AreEqual(1, project.Configs["Debug|Win32"].Assemblies.Count);
            Assert.AreEqual(1, project.Configs["Release|Win32"].Assemblies.Count);
            Assert.IsTrue(project.IsLoadable, "Not loadable");
            Assert.IsFalse(project.IsDirty, "Project should not be dirty");
        }
Ejemplo n.º 3
0
 public void WithUnmanagedCpp()
 {
     using (new TempResourceFile(this.GetType(), "resources.ClassLibrary1.csproj", @"ClassLibrary1\ClassLibrary1.csproj"))
         using (new TempResourceFile(this.GetType(), "resources.Unmanaged.vcproj", @"Unmanaged\Unmanaged.vcproj"))
             using (TempResourceFile file = new TempResourceFile(this.GetType(), "resources.Solution1.sln", "Solution1.sln"))
             {
                 NUnitProject project = NUnitProject.FromVSSolution(file.Path);
                 Assert.AreEqual(4, project.Configs.Count);
                 Assert.AreEqual(1, project.Configs["Debug"].Assemblies.Count);
                 Assert.AreEqual(1, project.Configs["Release"].Assemblies.Count);
                 Assert.AreEqual(1, project.Configs["Debug|Win32"].Assemblies.Count);
                 Assert.AreEqual(1, project.Configs["Release|Win32"].Assemblies.Count);
             }
 }
Ejemplo n.º 4
0
 public void FromVSSolution2005()
 {
     using (new TempResourceFile(this.GetType(), "resources.csharp-sample_VS2005.csproj", @"csharp\csharp-sample_VS2005.csproj"))
         using (new TempResourceFile(this.GetType(), "resources.jsharp_VS2005.vjsproj", @"jsharp\jsharp_VS2005.vjsproj"))
             using (new TempResourceFile(this.GetType(), "resources.vb-sample_VS2005.vbproj", @"vb\vb-sample_VS2005.vbproj"))
                 using (new TempResourceFile(this.GetType(), "resources.cpp-sample_VS2005.vcproj", @"cpp-sample\cpp-sample_VS2005.vcproj"))
                     using (TempResourceFile file = new TempResourceFile(this.GetType(), "resources.samples_VS2005.sln", "samples_VS2005.sln"))
                     {
                         NUnitProject project = NUnitProject.FromVSSolution(file.Path);
                         Assert.AreEqual(4, project.Configs.Count);
                         Assert.AreEqual(3, project.Configs["Debug"].Assemblies.Count);
                         Assert.AreEqual(3, project.Configs["Release"].Assemblies.Count);
                         Assert.AreEqual(1, project.Configs["Debug|Win32"].Assemblies.Count);
                         Assert.AreEqual(1, project.Configs["Release|Win32"].Assemblies.Count);
                         Assert.IsTrue(project.IsLoadable, "Not loadable");
                         Assert.IsFalse(project.IsDirty, "Project should not be dirty");
                     }
 }