From fbd4337b196f616d001c1c541cae14bc11ec0c3c Mon Sep 17 00:00:00 2001 From: Cathal McHale Date: Wed, 3 Jul 2019 16:26:18 +0100 Subject: [PATCH] Finally working. Logged issue: https://github.com/ttutisani/Xunit.Gherkin.Quick/issues/82 --- test/Ray.Domain.Test/Ray.Domain.Test.csproj | 14 ++------------ test/Ray.Domain.Test/Tuples/BasicMathOpsTests.cs | 7 +++---- .../features/tuples/BasicMathOps.feature | 8 ++++---- 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/test/Ray.Domain.Test/Ray.Domain.Test.csproj b/test/Ray.Domain.Test/Ray.Domain.Test.csproj index 812d7f4..dee8224 100644 --- a/test/Ray.Domain.Test/Ray.Domain.Test.csproj +++ b/test/Ray.Domain.Test/Ray.Domain.Test.csproj @@ -6,16 +6,6 @@ false - - - - - - - - - - @@ -35,10 +25,10 @@ PreserveNewest - Never + PreserveNewest - Never + PreserveNewest diff --git a/test/Ray.Domain.Test/Tuples/BasicMathOpsTests.cs b/test/Ray.Domain.Test/Tuples/BasicMathOpsTests.cs index ff0fd88..da4c06e 100644 --- a/test/Ray.Domain.Test/Tuples/BasicMathOpsTests.cs +++ b/test/Ray.Domain.Test/Tuples/BasicMathOpsTests.cs @@ -11,7 +11,7 @@ public sealed class BasicMathOpsTests : Feature _secondTuple = new Vector4(); [Given(@"a1 = tuple (\d) (-\d) (\d) (\d)")] - public void One(float x, float y, float z, float w) + public void InitializationValues_SetOnFirstTuple(float x, float y, float z, float w) { _firstTuple.X = x; _firstTuple.Y = y; @@ -20,7 +20,7 @@ public void One(float x, float y, float z, float w) } [And(@"a2 = tuple (-\d) (\d) (\d) (\d)")] - public void Two(float x, float y, float z, float w) + public void InitializationValues_SetOnSecondTuple(float x, float y, float z, float w) { _secondTuple.X = x; _secondTuple.Y = y; @@ -29,12 +29,11 @@ public void Two(float x, float y, float z, float w) } [Then(@"a1 plus a2 = tuple (\d) (\d) (\d) (\d)")] - public void Three(float x, float y, float z, float w) + public void GivenExpectedAnswer_PerformAddition_VerifyResult(float x, float y, float z, float w) { var expectedResult = new Vector4(x, y, z, w); var actualResult = Vector4.Add(_firstTuple, _secondTuple); Assert.True(expectedResult.Equals(actualResult)); } - } } diff --git a/test/Ray.Domain.Test/features/tuples/BasicMathOps.feature b/test/Ray.Domain.Test/features/tuples/BasicMathOps.feature index 237a542..680922b 100644 --- a/test/Ray.Domain.Test/features/tuples/BasicMathOps.feature +++ b/test/Ray.Domain.Test/features/tuples/BasicMathOps.feature @@ -2,8 +2,8 @@ Feature: BasicTuplesMathFeature In order to move around 3D space As a Ray Tracer I want the ability to perform basic math on points and vectors - -Scenario​: Adding two tuples + +Scenario: Adding two tuples Given a1 = tuple 3 -2 5 1 - ​​And​ a2 = tuple -2 3 1 0 - ​​Then​ a1 plus a2 = tuple 1 1 6 1 + And a2 = tuple -2 3 1 0 + Then a1 plus a2 = tuple 1 1 6 1