Skip to content

Commit

Permalink
Added testing project. Just sticking with xunit since that's what Nan…
Browse files Browse the repository at this point in the history
…cy.Testing

comes with.
  • Loading branch information
Ryan@Ryan-HP authored and Ryan@Ryan-HP committed Feb 13, 2012
1 parent e7ab3fd commit 9b2ab22
Show file tree
Hide file tree
Showing 19 changed files with 2,547 additions and 1 deletion.
87 changes: 87 additions & 0 deletions CodeProse.Shifter.Tests/CodeProse.Shifter.Tests.csproj
@@ -0,0 +1,87 @@
<?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>{3B07990D-B85C-4222-9134-8199D6255AF3}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CodeProse.Shifter.Tests</RootNamespace>
<AssemblyName>CodeProse.Shifter.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="HtmlAgilityPack">
<HintPath>..\packages\Nancy.Testing.0.9.0\lib\net40\HtmlAgilityPack.dll</HintPath>
</Reference>
<Reference Include="HtmlAgilityPlus">
<HintPath>..\packages\Nancy.Testing.0.9.0\lib\net40\HtmlAgilityPlus.dll</HintPath>
</Reference>
<Reference Include="Nancy">
<HintPath>..\packages\Nancy.0.9.0\lib\net40\Nancy.dll</HintPath>
</Reference>
<Reference Include="Nancy.Testing">
<HintPath>..\packages\Nancy.Testing.0.9.0\lib\net40\Nancy.Testing.dll</HintPath>
</Reference>
<Reference Include="Nancy.ViewEngines.Razor">
<HintPath>..\packages\Nancy.Viewengines.Razor.0.9.0\lib\net40\Nancy.ViewEngines.Razor.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.79.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=AMD64">
<HintPath>..\packages\System.Data.SQLite.x64.1.0.79.0\lib\net40\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.Linq">
<HintPath>..\packages\System.Data.SQLite.x64.1.0.79.0\lib\net40\System.Data.SQLite.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="xunit">
<HintPath>..\packages\xunit.1.7.0.1540\lib\xunit.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="LoginTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CodeProse.Shifter\CodeProse.Shifter.csproj">
<Project>{50D9701C-5036-40DF-941D-21DEF8D956E0}</Project>
<Name>CodeProse.Shifter</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>
18 changes: 18 additions & 0 deletions CodeProse.Shifter.Tests/LoginTests.cs
@@ -0,0 +1,18 @@
using CodeProse.Shifter.authentication;
using Xunit;
using Nancy.Testing;

namespace CodeProse.Shifter.Tests
{
public class LoginTests
{
[Fact]
public void CanGetLoginPage()
{
var browser = new Browser(new BootStrapper());
var response = browser.Get("/login", with => with.HttpRequest());

response.Body["form"].ShouldExist();
}
}
}
36 changes: 36 additions & 0 deletions CodeProse.Shifter.Tests/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
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("CodeProse.Shifter.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Hewlett-Packard")]
[assembly: AssemblyProduct("CodeProse.Shifter.Tests")]
[assembly: AssemblyCopyright("Copyright © Hewlett-Packard 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("a3c73d3e-3b79-48a0-90be-4029ef90349d")]

// 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")]
7 changes: 7 additions & 0 deletions CodeProse.Shifter.Tests/packages.config
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Nancy" version="0.9.0" />
<package id="Nancy.Testing" version="0.9.0" />
<package id="System.Data.SQLite.x64" version="1.0.79.0" />
<package id="xunit" version="1.7.0.1540" />
</packages>
6 changes: 6 additions & 0 deletions CodeProse.Shifter.sln
Expand Up @@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeProse.Shifter", "CodeProse.Shifter\CodeProse.Shifter.csproj", "{50D9701C-5036-40DF-941D-21DEF8D956E0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeProse.Shifter.Tests", "CodeProse.Shifter.Tests\CodeProse.Shifter.Tests.csproj", "{3B07990D-B85C-4222-9134-8199D6255AF3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -13,6 +15,10 @@ Global
{50D9701C-5036-40DF-941D-21DEF8D956E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{50D9701C-5036-40DF-941D-21DEF8D956E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{50D9701C-5036-40DF-941D-21DEF8D956E0}.Release|Any CPU.Build.0 = Release|Any CPU
{3B07990D-B85C-4222-9134-8199D6255AF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B07990D-B85C-4222-9134-8199D6255AF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B07990D-B85C-4222-9134-8199D6255AF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B07990D-B85C-4222-9134-8199D6255AF3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
1 change: 0 additions & 1 deletion CodeProse.Shifter/views/members.cshtml
Expand Up @@ -2,7 +2,6 @@
Layout = "layouts/base.cshtml";
}

<script type="text/javascript" src="../content/jquery.deletebutton.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var addMemberToList = function(currentMember) {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions packages/repositories.config
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path="..\CodeProse.Shifter.Tests\packages.config" />
<repository path="..\CodeProse.Shifter\packages.config" />
</repositories>
Binary file added packages/xunit.1.7.0.1540/lib/xunit.dll
Binary file not shown.

0 comments on commit 9b2ab22

Please sign in to comment.