Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Commit

Permalink
Watininja
Browse files Browse the repository at this point in the history
  • Loading branch information
davedf committed Jan 22, 2011
1 parent 1f9e53f commit 64485cd
Show file tree
Hide file tree
Showing 10 changed files with 201 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
website-final
.DS_Store
.DS_Store
Thumbs.db
14 changes: 14 additions & 0 deletions src/dotnet/WebNinja/WatiNinja/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="NUnit">
<section name="TestRunner" type="System.Configuration.NameValueSectionHandler"/>
</sectionGroup>
</configSections>
<NUnit>
<TestRunner>
<!-- Valid values are STA,MTA. Others ignored. -->
<add key="ApartmentState" value="STA" />
</TestRunner>
</NUnit>
</configuration>
11 changes: 11 additions & 0 deletions src/dotnet/WebNinja/WatiNinja/Class1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WatiNinja
{
public class Class1
{
}
}
36 changes: 36 additions & 0 deletions src/dotnet/WebNinja/WatiNinja/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -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("WatiNinja")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("WatiNinja")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
[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("a663a727-89fb-42a7-81d5-e0f37a14ad93")]

// 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")]
78 changes: 78 additions & 0 deletions src/dotnet/WebNinja/WatiNinja/WatiNinja.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{065957E6-9DEE-4908-9313-6CD1894034D8}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WatiNinja</RootNamespace>
<AssemblyName>WatiNinja</AssemblyName>
<TargetFrameworkVersion>v3.5</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="Cuke4Nuke.Framework, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Ruby\lib\ruby\gems\1.8\gems\cuke4nuke-0.4.0\dotnet\Cuke4Nuke.Framework.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.5.7.10213, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\nunit\net-2.0\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="WatiN.Core, Version=2.0.20.0, Culture=neutral, PublicKeyToken=db7cfd3acb5ad44e, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\WatiN-2.0\Bin\WatiN.Core.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="watininja\CukeStepsTest.cs" />
<Compile Include="watininja\SmokeTestSteps.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="features\smoketest.feature" />
<None Include="features\step_definitions\cucumber.wire" />
</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>
8 changes: 8 additions & 0 deletions src/dotnet/WebNinja/WatiNinja/features/smoketest.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@smoketest
Feature: Report on assigned problems
In order to see the the simplest case of cucumber selenium work
As a Developer
I want to run a run a smoke test

Scenario: Assigned problem
When I search for "WatiN" on google
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
host: localhost
port: 3901
18 changes: 18 additions & 0 deletions src/dotnet/WebNinja/WatiNinja/watininja/CukeStepsTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;

namespace WatiNinja.watininja
{
[TestFixture]
public class CukeStepsTest
{
[Test]
public void SmokeTest()
{
new SmokeTestSteps().HelloWatin("WatiN");
}
}
}
26 changes: 26 additions & 0 deletions src/dotnet/WebNinja/WatiNinja/watininja/SmokeTestSteps.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cuke4Nuke.Framework;
using NUnit.Framework;
using WatiN.Core;

namespace WatiNinja.watininja
{
public class SmokeTestSteps
{
[When("^I search for \"(.*)\" on google$")]
public void HelloWatin(string search)
{

using (var browser = new IE("http://www.google.com"))
{
browser.TextField(Find.ByName("q")).TypeText(search);
browser.Button(Find.ByName("btnG")).Click();

Assert.IsTrue(browser.ContainsText(search));
}
}
}
}
6 changes: 6 additions & 0 deletions src/dotnet/WebNinja/WebNinja.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebNinja", "WebNinja\WebNinja.csproj", "{6EC5ED89-C17E-47F8-AEA6-6DF6C64875F7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WatiNinja", "WatiNinja\WatiNinja.csproj", "{065957E6-9DEE-4908-9313-6CD1894034D8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -13,6 +15,10 @@ Global
{6EC5ED89-C17E-47F8-AEA6-6DF6C64875F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6EC5ED89-C17E-47F8-AEA6-6DF6C64875F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6EC5ED89-C17E-47F8-AEA6-6DF6C64875F7}.Release|Any CPU.Build.0 = Release|Any CPU
{065957E6-9DEE-4908-9313-6CD1894034D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{065957E6-9DEE-4908-9313-6CD1894034D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{065957E6-9DEE-4908-9313-6CD1894034D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{065957E6-9DEE-4908-9313-6CD1894034D8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit 64485cd

Please sign in to comment.