Commits

Lennon Shimokawa committed c269f57 Draft Merge

Merge pull request #10 from JuanjoFuchs/master

Initial structure for a C#-NUnit project using NUnit GUI

Comments (0)

Files changed (95)

csharp-nunit/.gitignore

+# Codigo compilado #
+####################
+*.dll
+*.pdb
+*.bin
+
+# Archivos de configuracion personales #
+########################################
+*.suo
+*.user
+
+# Archivos del SO #
+###################
+.DS_Store
+Thumbs.db
+
+# Carpetas #
+############
+_ReSharper.CodingDojo/
+_ReSharper.Tests/
+obj/
+bin/
+Debug/

csharp-nunit/.nuget/packages.config

+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="NUnit.Runners" version="2.6.1" />
+</packages>

csharp-nunit/CodingDojo.sln

+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{115729C4-76CC-4455-B31E-71148CC5895B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Src", "Src\Src.csproj", "{39694828-DADF-432D-ACC6-0F51664507D4}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{CC90DC56-93FD-42FA-81E0-31E3AEF064B4}"
+	ProjectSection(SolutionItems) = preProject
+		.nuget\packages.config = .nuget\packages.config
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{115729C4-76CC-4455-B31E-71148CC5895B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{115729C4-76CC-4455-B31E-71148CC5895B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{115729C4-76CC-4455-B31E-71148CC5895B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{115729C4-76CC-4455-B31E-71148CC5895B}.Release|Any CPU.Build.0 = Release|Any CPU
+		{39694828-DADF-432D-ACC6-0F51664507D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{39694828-DADF-432D-ACC6-0F51664507D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{39694828-DADF-432D-ACC6-0F51664507D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{39694828-DADF-432D-ACC6-0F51664507D4}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

csharp-nunit/README.md

+# C-Sharp with NUnit
+
+## How to run the tests
+* open start-gui.bat
+
+References and runners added with NuGet.
+
+# Documentation
+* [NUnit](http://nunit.sourceforge.net/)
+* [NuGet](http://nuget.org/)

csharp-nunit/Src/Calculator.cs

+namespace Src
+{
+    public class Calculator
+    {
+        public int Add(string input)
+        {
+            return 0;
+        }
+    }
+}

csharp-nunit/Src/Properties/AssemblyInfo.cs

+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Src")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Src")]
+[assembly: AssemblyCopyright("Copyright ©  2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("47bb009c-508a-467f-8b18-8d773aee6512")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

csharp-nunit/Src/Src.csproj

+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{39694828-DADF-432D-ACC6-0F51664507D4}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Src</RootNamespace>
+    <AssemblyName>Src</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Calculator.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

csharp-nunit/Src/bin/Debug/Src.dll

Binary file added.

csharp-nunit/Src/bin/Debug/Src.pdb

Binary file added.

csharp-nunit/Src/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file added.

csharp-nunit/Src/obj/Debug/Src.csproj.FileListAbsolute.txt

+C:\Users\JuanJose.Fuchs\Documents\GitHub\codingdojo\csharp-nunit\Src\bin\Debug\Src.dll
+C:\Users\JuanJose.Fuchs\Documents\GitHub\codingdojo\csharp-nunit\Src\bin\Debug\Src.pdb
+C:\Users\JuanJose.Fuchs\Documents\GitHub\codingdojo\csharp-nunit\Src\obj\Debug\Src.dll
+C:\Users\JuanJose.Fuchs\Documents\GitHub\codingdojo\csharp-nunit\Src\obj\Debug\Src.pdb

csharp-nunit/Src/obj/Debug/Src.dll

Binary file added.

csharp-nunit/Src/obj/Debug/Src.pdb

Binary file added.

csharp-nunit/Tests/CalculatorTests.cs

+namespace Tests
+{
+    using NUnit.Framework;
+
+    using Src;
+
+    [TestFixture]
+    public class CalculatorTests
+    {
+        [Test]
+        public void AddShouldReturnZeroWithEmptyString()
+        {
+            Calculator calculator = new Calculator();
+            int result = calculator.Add(string.Empty);
+            Assert.AreEqual(0, result);
+        }
+    }
+}

csharp-nunit/Tests/Properties/AssemblyInfo.cs

+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Tests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Tests")]
+[assembly: AssemblyCopyright("Copyright ©  2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("b5243b66-2fad-4d8a-9355-34159fa1a742")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

csharp-nunit/Tests/TestResult.xml

+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!--This file represents the results of running a test suite-->
+<test-results name="C:\Users\JuanJose.Fuchs\Documents\GitHub\codingdojo\csharp-nunit\Tests\Tests.nunit" total="1" errors="0" failures="0" not-run="0" inconclusive="0" ignored="0" skipped="0" invalid="0" date="2012-08-08" time="21:17:48">
+  <environment nunit-version="2.6.1.12217" clr-version="2.0.50727.5456" os-version="Microsoft Windows NT 6.1.7601 Service Pack 1" platform="Win32NT" cwd="C:\Users\JuanJose.Fuchs\Documents\GitHub\codingdojo\csharp-nunit" machine-name="JUANJO-LAPTOP" user="JuanJose.Fuchs" user-domain="SERIVA" />
+  <culture-info current-culture="es-PE" current-uiculture="en-US" />
+  <test-suite type="Project" name="C:\Users\JuanJose.Fuchs\Documents\GitHub\codingdojo\csharp-nunit\Tests\Tests.nunit" executed="True" result="Success" success="True" time="0.106" asserts="0">
+    <results>
+      <test-suite type="Assembly" name="C:\Users\JuanJose.Fuchs\Documents\GitHub\codingdojo\csharp-nunit\Tests\bin\Debug\Tests.dll" executed="True" result="Success" success="True" time="0.080" asserts="0">
+        <results>
+          <test-suite type="Namespace" name="Tests" executed="True" result="Success" success="True" time="0.080" asserts="0">
+            <results>
+              <test-suite type="TestFixture" name="CalculatorTests" executed="True" result="Success" success="True" time="0.079" asserts="0">
+                <results>
+                  <test-case name="Tests.CalculatorTests.AddShouldReturnZeroWithEmptyString" executed="True" result="Success" success="True" time="0.058" asserts="1" />
+                </results>
+              </test-suite>
+            </results>
+          </test-suite>
+        </results>
+      </test-suite>
+    </results>
+  </test-suite>
+</test-results>

csharp-nunit/Tests/Tests.VisualState.xml

+<?xml version="1.0" encoding="utf-8"?>
+<VisualState xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ShowCheckBoxes="false">
+  <TopNode>[0-1000]C:\Users\JuanJose.Fuchs\Documents\GitHub\codingdojo\csharp-nunit\Tests\Tests.nunit</TopNode>
+  <SelectedNode>[0-1000]C:\Users\JuanJose.Fuchs\Documents\GitHub\codingdojo\csharp-nunit\Tests\Tests.nunit</SelectedNode>
+  <ExcludeCategories>false</ExcludeCategories>
+  <Nodes>
+    <Node UniqueName="[0-1000]C:\Users\JuanJose.Fuchs\Documents\GitHub\codingdojo\csharp-nunit\Tests\Tests.nunit" Expanded="true" />
+    <Node UniqueName="[0-1003]C:\Users\JuanJose.Fuchs\Documents\GitHub\codingdojo\csharp-nunit\Tests\bin\Debug\Tests.dll" Expanded="true" />
+    <Node UniqueName="[0-1004]Tests" Expanded="true" />
+    <Node UniqueName="[0-1001]Tests.CalculatorTests" Expanded="true" />
+  </Nodes>
+</VisualState>

csharp-nunit/Tests/Tests.csproj

+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{115729C4-76CC-4455-B31E-71148CC5895B}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Tests</RootNamespace>
+    <AssemblyName>Tests</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="nunit.framework, Version=2.6.0.12051, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+      <HintPath>..\packages\NUnit.2.6.0.12054\lib\nunit.framework.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="CalculatorTests.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Src\Src.csproj">
+      <Project>{39694828-DADF-432D-ACC6-0F51664507D4}</Project>
+      <Name>Src</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

csharp-nunit/Tests/Tests.nunit

+<NUnitProject>
+  <Settings activeconfig="Debug" />
+  <Config name="Debug" binpathtype="Auto">
+    <assembly path="bin\Debug\Tests.dll" />
+  </Config>
+  <Config name="Release" binpathtype="Auto" />
+</NUnitProject>