Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a new feature "Setup number of players"

  • Loading branch information...
commit a12a47465dd4f33f2ba689a9aa6f7c1f21f7ce18 1 parent 9d1f556
@RezaJ RezaJ authored
View
3  Pong.Test.Acceptance/Pong.Test.Acceptance.csproj
@@ -42,12 +42,15 @@
<ItemGroup>
<Compile Include="HitTheBall.feature.cs" />
<Compile Include="HitTheBallSteps.cs" />
+ <Compile Include="SetupNumberOfPlayers.feature.cs" />
+ <Compile Include="SetupNumberOfPlayers.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<None Include="HitTheBall.feature">
<Generator>SpecFlow</Generator>
</None>
+ <None Include="SetupNumberOfPlayers.feature" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Pong\Pong.csproj">
View
29 Pong.Test.Acceptance/SetupNumberOfPlayers.cs
@@ -0,0 +1,29 @@
+using System;
+
+using TechTalk.SpecFlow;
+
+namespace Pong2.Test.Acceptance
+{
+ [Binding]
+ public class SetupNumbersOfPlayers
+ {
+ [Given(@"you are not in another game")]
+ public void GivenYouAreNotInAnotherGame()
+ {
+ ScenarioContext.Current.Pending();
+ }
+
+ [When(@"user choose 2 player")]
+ public void WhenUserChoose2Player()
+ {
+ ScenarioContext.Current.Pending();
+ }
+
+ [Then(@"2 paddles should be in the game")]
+ public void Then_2PaddlesShouldBeInTheGame()
+ {
+ ScenarioContext.Current.Pending();
+ }
+ }
+}
+
View
14 Pong.Test.Acceptance/SetupNumberOfPlayers.feature
@@ -0,0 +1,14 @@
+Feature: Setup number of players
+ In order to play multiplayer game
+ As a main player
+ I want to be able to choose in what mode to play
+
+@mytag
+Scenario: Register a new game
+ Given there is a game in init mode
+ And you are not in another game
+ When user choose 2 player
+ Then 2 paddles should be in the game
+
+
+
View
91 Pong.Test.Acceptance/SetupNumberOfPlayers.feature.cs
@@ -0,0 +1,91 @@
+// ------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by SpecFlow (http://www.specflow.org/).
+// SpecFlow Version:1.8.1.0
+// SpecFlow Generator Version:1.8.0.0
+// Runtime Version:2.0.50727.5448
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+// ------------------------------------------------------------------------------
+#region Designer generated code
+#pragma warning disable
+namespace Pong2.Test.Acceptance
+{
+ using TechTalk.SpecFlow;
+
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.8.1.0")]
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [NUnit.Framework.TestFixtureAttribute()]
+ [NUnit.Framework.DescriptionAttribute("Setup number of players")]
+ public partial class SetupNumberOfPlayersFeature
+ {
+
+ private static TechTalk.SpecFlow.ITestRunner testRunner;
+
+#line 1 "SetupNumberOfPlayers.feature"
+#line hidden
+
+ [NUnit.Framework.TestFixtureSetUpAttribute()]
+ public virtual void FeatureSetup()
+ {
+ testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
+ TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Setup number of players", "In order to play multiplayer game\r\nAs a main player\r\nI want to be able to choose " +
+ "in what mode to play", ProgrammingLanguage.CSharp, ((string[])(null)));
+ testRunner.OnFeatureStart(featureInfo);
+ }
+
+ [NUnit.Framework.TestFixtureTearDownAttribute()]
+ public virtual void FeatureTearDown()
+ {
+ testRunner.OnFeatureEnd();
+ testRunner = null;
+ }
+
+ [NUnit.Framework.SetUpAttribute()]
+ public virtual void TestInitialize()
+ {
+ }
+
+ [NUnit.Framework.TearDownAttribute()]
+ public virtual void ScenarioTearDown()
+ {
+ testRunner.OnScenarioEnd();
+ }
+
+ public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
+ {
+ testRunner.OnScenarioStart(scenarioInfo);
+ }
+
+ public virtual void ScenarioCleanup()
+ {
+ testRunner.CollectScenarioErrors();
+ }
+
+ [NUnit.Framework.TestAttribute()]
+ [NUnit.Framework.DescriptionAttribute("Register a new game")]
+ [NUnit.Framework.CategoryAttribute("mytag")]
+ public virtual void RegisterANewGame()
+ {
+ TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Register a new game", new string[] {
+ "mytag"});
+#line 7
+this.ScenarioSetup(scenarioInfo);
+#line 8
+ testRunner.Given("there is a game in init mode");
+#line 9
+ testRunner.And("you are not in another game");
+#line 10
+ testRunner.When("user choose 2 player");
+#line 11
+ testRunner.Then("2 paddles should be in the game");
+#line hidden
+ this.ScenarioCleanup();
+ }
+ }
+}
+#pragma warning restore
+#endregion
Please sign in to comment.
Something went wrong with that request. Please try again.