diff --git a/.github/workflows/build-on-push.yml b/.github/workflows/build-on-push.yml
index 637a744..9443780 100644
--- a/.github/workflows/build-on-push.yml
+++ b/.github/workflows/build-on-push.yml
@@ -12,7 +12,7 @@ jobs:
- name: Run Tcp ESDB image
run: docker run -d --name tcp_esdbnode -it -p 2113:2113 -p 1113:1113 eventstore/eventstore:release-5.0.11 --runprojections all --startstandardprojections
- name: Run Grpc ESDB image
- run: docker run -d --name grpc_esdbnode -it -p 2114:2113 -p 1114:1113 eventstore/eventstore:22.10.1-bionic --insecure --runprojections all --startstandardprojections
+ run: docker run -d --name grpc_esdbnode -it -p 2114:2113 -p 1114:1113 eventstore/eventstore:22.10.2-bionic --insecure --runprojections all --startstandardprojections --enable-atom-pub-over-http
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET
@@ -30,4 +30,19 @@ jobs:
- name: Test
run: dotnet test --no-build --verbosity minimal
working-directory: ./src
-
+ - name: Stop Tcp ESDB image
+ if: always()
+ run: |
+ id=$(docker ps -a -q -f name=tcp_esdbnode)
+ if [ ! -z "$id" ]; then
+ docker stop $id
+ docker rm $id
+ fi
+ - name: Stop Grpc ESDB image
+ if: always()
+ run: |
+ id=$(docker ps -a -q -f name=grpc_esdbnode)
+ if [ ! -z "$id" ]; then
+ docker stop $id
+ docker rm $id
+ fi
diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml
index c62c2be..5ca1fc0 100644
--- a/.github/workflows/build-pr.yml
+++ b/.github/workflows/build-pr.yml
@@ -12,7 +12,7 @@ jobs:
- name: Run Tcp ESDB image
run: docker run -d --name tcp_esdbnode -it -p 2113:2113 -p 1113:1113 eventstore/eventstore:release-5.0.11 --runprojections all --startstandardprojections
- name: Run Grpc ESDB image
- run: docker run -d --name grpc_esdbnode -it -p 2114:2113 -p 1114:1113 eventstore/eventstore:22.10.1-bionic --insecure --runprojections all --startstandardprojections
+ run: docker run -d --name grpc_esdbnode -it -p 2114:2113 -p 1114:1113 eventstore/eventstore:22.10.2-bionic --insecure --runprojections all --startstandardprojections --enable-atom-pub-over-http
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
@@ -29,5 +29,19 @@ jobs:
- name: Test
run: dotnet test --no-build --verbosity minimal
working-directory: ./src
-
-
+ - name: Stop Tcp ESDB image
+ if: always()
+ run: |
+ id=$(docker ps -a -q -f name=tcp_esdbnode)
+ if [ ! -z "$id" ]; then
+ docker stop $id
+ docker rm $id
+ fi
+ - name: Stop Grpc ESDB image
+ if: always()
+ run: |
+ id=$(docker ps -a -q -f name=grpc_esdbnode)
+ if [ ! -z "$id" ]; then
+ docker stop $id
+ docker rm $id
+ fi
diff --git a/.github/workflows/build-version-tag.yml b/.github/workflows/build-version-tag.yml
index 16ee3be..76e698f 100644
--- a/.github/workflows/build-version-tag.yml
+++ b/.github/workflows/build-version-tag.yml
@@ -47,7 +47,7 @@ jobs:
- name: Run Tcp ESDB image
run: docker run -d --name tcp_esdbnode -it -p 2113:2113 -p 1113:1113 eventstore/eventstore:release-5.0.11 --runprojections all --startstandardprojections
- name: Run Grpc ESDB image
- run: docker run -d --name grpc_esdbnode -it -p 2114:2113 -p 1114:1113 eventstore/eventstore:22.10.1-bionic --insecure --runprojections all --startstandardprojections
+ run: docker run -d --name grpc_esdbnode -it -p 2114:2113 -p 1114:1113 eventstore/eventstore:22.10.2-bionic --insecure --runprojections all --startstandardprojections --enable-atom-pub-over-http
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
@@ -68,3 +68,19 @@ jobs:
nuget_key: ${{ secrets.PUBLISH_BO_EVENTSTORE }}
run: dotnet nuget push "./BullOak.Repositories.EventStore/bin/Any CPU/release/BullOak.Repositories.EventStore*.nupkg" --api-key "$nuget_key" -s https://api.nuget.org/v3/index.json --skip-duplicate
working-directory: ./src
+ - name: Stop Tcp ESDB image
+ if: always()
+ run: |
+ id=$(docker ps -a -q -f name=tcp_esdbnode)
+ if [ ! -z "$id" ]; then
+ docker stop $id
+ docker rm $id
+ fi
+ - name: Stop Grpc ESDB image
+ if: always()
+ run: |
+ id=$(docker ps -a -q -f name=grpc_esdbnode)
+ if [ ! -z "$id" ]; then
+ docker stop $id
+ docker rm $id
+ fi
diff --git a/src/BullOak.Repositories.EventStore.Test.Integration/BullOak.Repositories.EventStore.Test.Integration.csproj b/src/BullOak.Repositories.EventStore.Test.Integration/BullOak.Repositories.EventStore.Test.Integration.csproj
index ea53a8b..9ae2b72 100644
--- a/src/BullOak.Repositories.EventStore.Test.Integration/BullOak.Repositories.EventStore.Test.Integration.csproj
+++ b/src/BullOak.Repositories.EventStore.Test.Integration/BullOak.Repositories.EventStore.Test.Integration.csproj
@@ -19,7 +19,7 @@
-
+
@@ -40,13 +40,4 @@
-
-
- Always
-
-
- Always
-
-
-
diff --git a/src/BullOak.Repositories.EventStore.Test.Integration/Contexts/EventStoreIntegrationContext.cs b/src/BullOak.Repositories.EventStore.Test.Integration/Contexts/EventStoreIntegrationContext.cs
index e0db70f..eb5f899 100644
--- a/src/BullOak.Repositories.EventStore.Test.Integration/Contexts/EventStoreIntegrationContext.cs
+++ b/src/BullOak.Repositories.EventStore.Test.Integration/Contexts/EventStoreIntegrationContext.cs
@@ -68,7 +68,7 @@ public EventStoreIntegrationContext(PassThroughValidator validator)
DateTimeProvider = new TestDateTimeProvider();
}
- public static void SetupNode()
+ public static void SetupConfiguration()
{
configuration = Configuration.Begin()
.WithDefaultCollection()
@@ -97,10 +97,6 @@ async Task ConfigureWriter()
_ => throw new ArgumentOutOfRangeException(nameof(protocol))
};
- public static void TeardownNode()
- {
- }
-
public async Task> StartSession(string streamName, DateTime? appliesAt = null)
{
var session = await Repository.BeginSessionFor(streamName, appliesAt: appliesAt).ConfigureAwait(false);
@@ -150,6 +146,7 @@ private async Task GrpcReadEventsFromStreamRaw(string id)
{
var readResults = connV20.ReadStreamAsync(ClientV20.Direction.Forwards, id, ClientV20.StreamPosition.Start);
return await readResults
+ // ReSharper disable once ConditionIsAlwaysTrueOrFalse
.Where(e => e.Event != null)
.Select(e => e.Event.ToStoredEvent(configuration.StateFactory))
.ToArrayAsync();
diff --git a/src/BullOak.Repositories.EventStore.Test.Integration/EventStoreServer/EventStore.ClusterNode.exe b/src/BullOak.Repositories.EventStore.Test.Integration/EventStoreServer/EventStore.ClusterNode.exe
deleted file mode 100644
index ad704a7..0000000
Binary files a/src/BullOak.Repositories.EventStore.Test.Integration/EventStoreServer/EventStore.ClusterNode.exe and /dev/null differ
diff --git a/src/BullOak.Repositories.EventStore.Test.Integration/Specification/ReadModelSpecs.feature b/src/BullOak.Repositories.EventStore.Test.Integration/Specification/ReadModelSpecs.feature
index 6409c63..607bf99 100644
--- a/src/BullOak.Repositories.EventStore.Test.Integration/Specification/ReadModelSpecs.feature
+++ b/src/BullOak.Repositories.EventStore.Test.Integration/Specification/ReadModelSpecs.feature
@@ -72,5 +72,5 @@ Scenario Outline: Reconstitute state based on category with two event types up t
And after waiting for 15 seconds for categories to be processed
When I load all my entities as of '2020-09-20 11:10:00' for the streams category
Then the load process should succeed
- And the visibilty should be disabled
+ And the visibility should be disabled
diff --git a/src/BullOak.Repositories.EventStore.Test.Integration/Specification/ReadModelSpecs.feature.cs b/src/BullOak.Repositories.EventStore.Test.Integration/Specification/ReadModelSpecs.feature.cs
deleted file mode 100644
index 148fa42..0000000
--- a/src/BullOak.Repositories.EventStore.Test.Integration/Specification/ReadModelSpecs.feature.cs
+++ /dev/null
@@ -1,390 +0,0 @@
-// ------------------------------------------------------------------------------
-//
-// This code was generated by SpecFlow (https://www.specflow.org/).
-// SpecFlow Version:3.9.0.0
-// SpecFlow Generator Version:3.9.0.0
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-// ------------------------------------------------------------------------------
-#region Designer generated code
-#pragma warning disable
-namespace BullOak.Repositories.EventStore.Test.Integration.Specification
-{
- using TechTalk.SpecFlow;
- using System;
- using System.Linq;
-
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")]
- [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- public partial class ReadModelSpecsFeature : object, Xunit.IClassFixture, System.IDisposable
- {
-
- private static TechTalk.SpecFlow.ITestRunner testRunner;
-
- private static string[] featureTags = ((string[])(null));
-
- private Xunit.Abstractions.ITestOutputHelper _testOutputHelper;
-
-#line 1 "ReadModelSpecs.feature"
-#line hidden
-
- public ReadModelSpecsFeature(ReadModelSpecsFeature.FixtureData fixtureData, BullOak_Repositories_EventStore_Test_Integration_XUnitAssemblyFixture assemblyFixture, Xunit.Abstractions.ITestOutputHelper testOutputHelper)
- {
- this._testOutputHelper = testOutputHelper;
- this.TestInitialize();
- }
-
- public static void FeatureSetup()
- {
- testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
- TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Specification", "ReadModelSpecs", "\tIn order to support read models\r\n\tAs a user of this library\r\n\tI want to be able " +
- "to load entities from readonly repositories", ProgrammingLanguage.CSharp, featureTags);
- testRunner.OnFeatureStart(featureInfo);
- }
-
- public static void FeatureTearDown()
- {
- testRunner.OnFeatureEnd();
- testRunner = null;
- }
-
- public void TestInitialize()
- {
- }
-
- public void TestTearDown()
- {
- testRunner.OnScenarioEnd();
- }
-
- public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
- {
- testRunner.OnScenarioInitialize(scenarioInfo);
- testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testOutputHelper);
- }
-
- public void ScenarioStart()
- {
- testRunner.OnScenarioStart();
- }
-
- public void ScenarioCleanup()
- {
- testRunner.CollectScenarioErrors();
- }
-
- public virtual void FeatureBackground()
- {
-#line 6
-#line hidden
-#line 7
- testRunner.Given("the grpc protocol is being used", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
- }
-
- void System.IDisposable.Dispose()
- {
- this.TestTearDown();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="Reconstitute state from one event stored using interface")]
- [Xunit.TraitAttribute("FeatureTitle", "ReadModelSpecs")]
- [Xunit.TraitAttribute("Description", "Reconstitute state from one event stored using interface")]
- public void ReconstituteStateFromOneEventStoredUsingInterface()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Reconstitute state from one event stored using interface", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 9
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 10
- testRunner.Given("a new stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 11
- testRunner.And("3 new events", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 12
- testRunner.And("I try to save the new events in the stream through their interface", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 13
- testRunner.When("I load my entity through the read-only repository", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 14
- testRunner.Then("the load process should succeed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 15
- testRunner.And("HighOrder property should be 2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 16
- testRunner.And("have a concurrency id of 2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="Load entity as at a point in time")]
- [Xunit.TraitAttribute("FeatureTitle", "ReadModelSpecs")]
- [Xunit.TraitAttribute("Description", "Load entity as at a point in time")]
- public void LoadEntityAsAtAPointInTime()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Load entity as at a point in time", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 18
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 19
- testRunner.Given("a new stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
- TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
- "Timestamp"});
- table2.AddRow(new string[] {
- "2020-09-10 11:10:00"});
- table2.AddRow(new string[] {
- "2020-09-20 11:10:00"});
- table2.AddRow(new string[] {
- "2020-09-23 11:10:00"});
-#line 20
- testRunner.And("the following events with the following timestamps", ((string)(null)), table2, "And ");
-#line hidden
-#line 25
- testRunner.And("I try to save the new events in the stream through their interface", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 26
- testRunner.When("I load my entity through the read-only repository as of \'2020-09-22 11:10:00\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 27
- testRunner.Then("the load process should succeed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 28
- testRunner.And("HighOrder property should be 1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="Reconstitute streams with one event type based on category")]
- [Xunit.TraitAttribute("FeatureTitle", "ReadModelSpecs")]
- [Xunit.TraitAttribute("Description", "Reconstitute streams with one event type based on category")]
- public void ReconstituteStreamsWithOneEventTypeBasedOnCategory()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Reconstitute streams with one event type based on category", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 30
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 31
- testRunner.Given("a new stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
- TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] {
- "Timestamp"});
- table3.AddRow(new string[] {
- "2020-09-10 11:10:00"});
- table3.AddRow(new string[] {
- "2020-09-20 11:10:00"});
- table3.AddRow(new string[] {
- "2020-09-23 11:10:00"});
-#line 32
- testRunner.And("the following events with the following timestamps", ((string)(null)), table3, "And ");
-#line hidden
-#line 37
- testRunner.And("I try to save the new events in the stream through their interface", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 38
- testRunner.And("after waiting for 15 seconds for categories to be processed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 39
- testRunner.When("I load all my entities for the streams category", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 40
- testRunner.Then("the load process should succeed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 41
- testRunner.And("HighOrder property should be 2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="Reconstitute streams with one event type based on category up to a given date")]
- [Xunit.TraitAttribute("FeatureTitle", "ReadModelSpecs")]
- [Xunit.TraitAttribute("Description", "Reconstitute streams with one event type based on category up to a given date")]
- public void ReconstituteStreamsWithOneEventTypeBasedOnCategoryUpToAGivenDate()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Reconstitute streams with one event type based on category up to a given date", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 43
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 44
- testRunner.Given("a new stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 45
- testRunner.And("another new stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- TechTalk.SpecFlow.Table table4 = new TechTalk.SpecFlow.Table(new string[] {
- "Timestamp"});
- table4.AddRow(new string[] {
- "2020-09-10 11:10:00"});
- table4.AddRow(new string[] {
- "2020-09-20 11:10:00"});
- table4.AddRow(new string[] {
- "2020-09-23 11:10:00"});
-#line 46
- testRunner.And("the following events with timestamps for stream 1", ((string)(null)), table4, "And ");
-#line hidden
- TechTalk.SpecFlow.Table table5 = new TechTalk.SpecFlow.Table(new string[] {
- "Timestamp"});
- table5.AddRow(new string[] {
- "2020-09-10 11:10:00"});
- table5.AddRow(new string[] {
- "2020-09-20 11:10:00"});
- table5.AddRow(new string[] {
- "2020-09-20 12:10:00"});
- table5.AddRow(new string[] {
- "2020-09-20 12:20:00"});
- table5.AddRow(new string[] {
- "2020-09-23 11:10:00"});
-#line 51
- testRunner.And("the following events with timestamps for stream 2", ((string)(null)), table5, "And ");
-#line hidden
-#line 58
- testRunner.And("I try to save the new events in the stream through their interface", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 59
- testRunner.And("after waiting for 15 seconds for categories to be processed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 60
- testRunner.When("I load all my entities as of \'2020-09-22 11:10:00\' for the streams category", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 61
- testRunner.Then("the load process should succeed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 62
- testRunner.And("HighOrder property for stream 1 should be 1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 63
- testRunner.And("HighOrder property for stream 2 should be 3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="Reconstitute state based on category with two event types up to a given date")]
- [Xunit.TraitAttribute("FeatureTitle", "ReadModelSpecs")]
- [Xunit.TraitAttribute("Description", "Reconstitute state based on category with two event types up to a given date")]
- public void ReconstituteStateBasedOnCategoryWithTwoEventTypesUpToAGivenDate()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Reconstitute state based on category with two event types up to a given date", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 65
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 66
- testRunner.Given("a new stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
- TechTalk.SpecFlow.Table table6 = new TechTalk.SpecFlow.Table(new string[] {
- "Timestamp"});
- table6.AddRow(new string[] {
- "2020-09-10 11:10:00"});
-#line 67
- testRunner.And("the following events with the following timestamps", ((string)(null)), table6, "And ");
-#line hidden
-#line 70
- testRunner.And("I try to save the new events in the stream through their interface", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 71
- testRunner.And("I update the state of visible to be enabled as of \'2020-09-22 11:10:00\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 72
- testRunner.And("after waiting for 15 seconds for categories to be processed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 73
- testRunner.When("I load all my entities as of \'2020-09-20 11:10:00\' for the streams category", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 74
- testRunner.Then("the load process should succeed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 75
- testRunner.And("the visibilty should be disabled", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")]
- [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- public class FixtureData : System.IDisposable
- {
-
- public FixtureData()
- {
- ReadModelSpecsFeature.FeatureSetup();
- }
-
- void System.IDisposable.Dispose()
- {
- ReadModelSpecsFeature.FeatureTearDown();
- }
- }
- }
-}
-#pragma warning restore
-#endregion
diff --git a/src/BullOak.Repositories.EventStore.Test.Integration/Specification/ReconstituteState.feature b/src/BullOak.Repositories.EventStore.Test.Integration/Specification/ReconstituteState.feature
index 35ee2bc..d55886b 100644
--- a/src/BullOak.Repositories.EventStore.Test.Integration/Specification/ReconstituteState.feature
+++ b/src/BullOak.Repositories.EventStore.Test.Integration/Specification/ReconstituteState.feature
@@ -65,6 +65,7 @@ Scenario Outline: Reconstitute state from empty stream should succeed and return
Scenario Outline: Reconstitute state after a soft delete should succeed and return default state
Given a new stream
And 3 new events
+ And I try to save the new events in the stream
And I soft-delete the stream
When I load my entity
Then the load process should succeed
diff --git a/src/BullOak.Repositories.EventStore.Test.Integration/Specification/ReconstituteState.feature.cs b/src/BullOak.Repositories.EventStore.Test.Integration/Specification/ReconstituteState.feature.cs
deleted file mode 100644
index 35ffbbf..0000000
--- a/src/BullOak.Repositories.EventStore.Test.Integration/Specification/ReconstituteState.feature.cs
+++ /dev/null
@@ -1,464 +0,0 @@
-// ------------------------------------------------------------------------------
-//
-// This code was generated by SpecFlow (https://www.specflow.org/).
-// SpecFlow Version:3.9.0.0
-// SpecFlow Generator Version:3.9.0.0
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-// ------------------------------------------------------------------------------
-#region Designer generated code
-#pragma warning disable
-namespace BullOak.Repositories.EventStore.Test.Integration.Specification
-{
- using TechTalk.SpecFlow;
- using System;
- using System.Linq;
-
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")]
- [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- public partial class ReconstituteStateFeature : object, Xunit.IClassFixture, System.IDisposable
- {
-
- private static TechTalk.SpecFlow.ITestRunner testRunner;
-
- private static string[] featureTags = ((string[])(null));
-
- private Xunit.Abstractions.ITestOutputHelper _testOutputHelper;
-
-#line 1 "ReconstituteState.feature"
-#line hidden
-
- public ReconstituteStateFeature(ReconstituteStateFeature.FixtureData fixtureData, BullOak_Repositories_EventStore_Test_Integration_XUnitAssemblyFixture assemblyFixture, Xunit.Abstractions.ITestOutputHelper testOutputHelper)
- {
- this._testOutputHelper = testOutputHelper;
- this.TestInitialize();
- }
-
- public static void FeatureSetup()
- {
- testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
- TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Specification", "ReconstituteState", "\tIn order to apply business logic on stored entities\r\n\tAs a developer using this " +
- "library\r\n\tI want to be able to get correctly reconstituted states from my event " +
- "stream", ProgrammingLanguage.CSharp, featureTags);
- testRunner.OnFeatureStart(featureInfo);
- }
-
- public static void FeatureTearDown()
- {
- testRunner.OnFeatureEnd();
- testRunner = null;
- }
-
- public void TestInitialize()
- {
- }
-
- public void TestTearDown()
- {
- testRunner.OnScenarioEnd();
- }
-
- public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
- {
- testRunner.OnScenarioInitialize(scenarioInfo);
- testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testOutputHelper);
- }
-
- public void ScenarioStart()
- {
- testRunner.OnScenarioStart();
- }
-
- public void ScenarioCleanup()
- {
- testRunner.CollectScenarioErrors();
- }
-
- public virtual void FeatureBackground()
- {
-#line 6
-#line hidden
-#line 7
- testRunner.Given("the grpc protocol is being used", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
- }
-
- void System.IDisposable.Dispose()
- {
- this.TestTearDown();
- }
-
- [Xunit.SkippableTheoryAttribute(DisplayName="Load stored entity with from existing events")]
- [Xunit.TraitAttribute("FeatureTitle", "ReconstituteState")]
- [Xunit.TraitAttribute("Description", "Load stored entity with from existing events")]
- [Xunit.InlineDataAttribute("2", "1", "1", new string[0])]
- [Xunit.InlineDataAttribute("5", "4", "4", new string[0])]
- [Xunit.InlineDataAttribute("10000", "9999", "9999", new string[0])]
- public void LoadStoredEntityWithFromExistingEvents(string eventsCount, string expectedHighOrder, string expectedLastState, string[] exampleTags)
- {
- string[] tagsOfScenario = exampleTags;
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- argumentsOfScenario.Add("eventsCount", eventsCount);
- argumentsOfScenario.Add("expectedHighOrder", expectedHighOrder);
- argumentsOfScenario.Add("expectedLastState", expectedLastState);
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Load stored entity with from existing events", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 9
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 10
- testRunner.Given("a new stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 11
- testRunner.And(string.Format("{0} new events", eventsCount), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 12
- testRunner.When("I try to save the new events in the stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 13
- testRunner.And("I load my entity", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 14
- testRunner.Then(string.Format("HighOrder property should be {0}", expectedHighOrder), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 15
- testRunner.And(string.Format("LastState property should be {0}", expectedLastState), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="Load stream backwards - sanity check")]
- [Xunit.TraitAttribute("FeatureTitle", "ReconstituteState")]
- [Xunit.TraitAttribute("Description", "Load stream backwards - sanity check")]
- public void LoadStreamBackwards_SanityCheck()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Load stream backwards - sanity check", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 23
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 24
- testRunner.Given("a new stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 25
- testRunner.And("4 new events", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 26
- testRunner.And("I try to save the new events in the stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 27
- testRunner.When("I load my entity backwards", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 28
- testRunner.Then("the load process should succeed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 29
- testRunner.And("HighOrder property should be 3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="Load stream forwards - sanity check")]
- [Xunit.TraitAttribute("FeatureTitle", "ReconstituteState")]
- [Xunit.TraitAttribute("Description", "Load stream forwards - sanity check")]
- public void LoadStreamForwards_SanityCheck()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Load stream forwards - sanity check", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 31
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 32
- testRunner.Given("a new stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 33
- testRunner.And("4 new events", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 34
- testRunner.And("I try to save the new events in the stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 35
- testRunner.When("I load my entity forwards", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 36
- testRunner.Then("the load process should succeed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 37
- testRunner.And("HighOrder property should be 3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="Reconstitute state from one event stored using interface")]
- [Xunit.TraitAttribute("FeatureTitle", "ReconstituteState")]
- [Xunit.TraitAttribute("Description", "Reconstitute state from one event stored using interface")]
- public void ReconstituteStateFromOneEventStoredUsingInterface()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Reconstitute state from one event stored using interface", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 39
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 40
- testRunner.Given("a new stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 41
- testRunner.And("3 new events", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 42
- testRunner.And("I try to save the new events in the stream through their interface", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 43
- testRunner.When("I load my entity", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 44
- testRunner.Then("the load process should succeed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 45
- testRunner.And("HighOrder property should be 2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="Reconstitute state up to a given date")]
- [Xunit.TraitAttribute("FeatureTitle", "ReconstituteState")]
- [Xunit.TraitAttribute("Description", "Reconstitute state up to a given date")]
- public void ReconstituteStateUpToAGivenDate()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Reconstitute state up to a given date", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 47
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 48
- testRunner.Given("a new stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
- TechTalk.SpecFlow.Table table7 = new TechTalk.SpecFlow.Table(new string[] {
- "Timestamp"});
- table7.AddRow(new string[] {
- "2020-09-10 11:10:00"});
- table7.AddRow(new string[] {
- "2020-09-20 11:10:00"});
- table7.AddRow(new string[] {
- "2020-09-23 11:10:00"});
-#line 49
- testRunner.And("the following events with the following timestamps", ((string)(null)), table7, "And ");
-#line hidden
-#line 54
- testRunner.And("I try to save the new events in the stream through their interface", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 55
- testRunner.When("I load my entity as of \'2020-09-22 11:10:00\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 56
- testRunner.Then("the load process should succeed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 57
- testRunner.And("HighOrder property should be 1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="Reconstitute state from empty stream should succeed and return default state")]
- [Xunit.TraitAttribute("FeatureTitle", "ReconstituteState")]
- [Xunit.TraitAttribute("Description", "Reconstitute state from empty stream should succeed and return default state")]
- public void ReconstituteStateFromEmptyStreamShouldSucceedAndReturnDefaultState()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Reconstitute state from empty stream should succeed and return default state", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 59
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 60
- testRunner.Given("a new stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 61
- testRunner.When("I load my entity", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 62
- testRunner.Then("the load process should succeed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 63
- testRunner.And("HighOrder property should be 0", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="Reconstitute state after a soft delete should succeed and return default state")]
- [Xunit.TraitAttribute("FeatureTitle", "ReconstituteState")]
- [Xunit.TraitAttribute("Description", "Reconstitute state after a soft delete should succeed and return default state")]
- public void ReconstituteStateAfterASoftDeleteShouldSucceedAndReturnDefaultState()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Reconstitute state after a soft delete should succeed and return default state", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 65
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 66
- testRunner.Given("a new stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 67
- testRunner.And("3 new events", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 68
- testRunner.And("I soft-delete the stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 69
- testRunner.When("I load my entity", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 70
- testRunner.Then("the load process should succeed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 71
- testRunner.And("HighOrder property should be 0", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="Reconstitute state after a hard delete should succeed and return default state")]
- [Xunit.TraitAttribute("FeatureTitle", "ReconstituteState")]
- [Xunit.TraitAttribute("Description", "Reconstitute state after a hard delete should succeed and return default state")]
- public void ReconstituteStateAfterAHardDeleteShouldSucceedAndReturnDefaultState()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Reconstitute state after a hard delete should succeed and return default state", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 73
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 74
- testRunner.Given("a new stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 75
- testRunner.And("3 new events", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 76
- testRunner.And("I hard-delete the stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 77
- testRunner.When("I load my entity", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 78
- testRunner.Then("the load process should succeed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 79
- testRunner.And("HighOrder property should be 0", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")]
- [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- public class FixtureData : System.IDisposable
- {
-
- public FixtureData()
- {
- ReconstituteStateFeature.FeatureSetup();
- }
-
- void System.IDisposable.Dispose()
- {
- ReconstituteStateFeature.FeatureTearDown();
- }
- }
- }
-}
-#pragma warning restore
-#endregion
diff --git a/src/BullOak.Repositories.EventStore.Test.Integration/Specification/SaveEventStream.feature b/src/BullOak.Repositories.EventStore.Test.Integration/Specification/SaveEventStream.feature
index 2b9de5d..c6c44a1 100644
--- a/src/BullOak.Repositories.EventStore.Test.Integration/Specification/SaveEventStream.feature
+++ b/src/BullOak.Repositories.EventStore.Test.Integration/Specification/SaveEventStream.feature
@@ -63,6 +63,7 @@ Scenario Outline: Write after a hard deleted stream should fail
Scenario Outline: Write after a soft deleted stream should succeed
Given a new stream
And 3 new events
+ And I try to save the new events in the stream
And I soft-delete the stream
And 10 new events
When I try to save the new events in the stream
diff --git a/src/BullOak.Repositories.EventStore.Test.Integration/Specification/SaveEventStream.feature.cs b/src/BullOak.Repositories.EventStore.Test.Integration/Specification/SaveEventStream.feature.cs
deleted file mode 100644
index d5c5d9c..0000000
--- a/src/BullOak.Repositories.EventStore.Test.Integration/Specification/SaveEventStream.feature.cs
+++ /dev/null
@@ -1,525 +0,0 @@
-// ------------------------------------------------------------------------------
-//
-// This code was generated by SpecFlow (https://www.specflow.org/).
-// SpecFlow Version:3.9.0.0
-// SpecFlow Generator Version:3.9.0.0
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-// ------------------------------------------------------------------------------
-#region Designer generated code
-#pragma warning disable
-namespace BullOak.Repositories.EventStore.Test.Integration.Specification
-{
- using TechTalk.SpecFlow;
- using System;
- using System.Linq;
-
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")]
- [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- public partial class SaveEventsStreamFeature : object, Xunit.IClassFixture, System.IDisposable
- {
-
- private static TechTalk.SpecFlow.ITestRunner testRunner;
-
- private static string[] featureTags = ((string[])(null));
-
- private Xunit.Abstractions.ITestOutputHelper _testOutputHelper;
-
-#line 1 "SaveEventStream.feature"
-#line hidden
-
- public SaveEventsStreamFeature(SaveEventsStreamFeature.FixtureData fixtureData, BullOak_Repositories_EventStore_Test_Integration_XUnitAssemblyFixture assemblyFixture, Xunit.Abstractions.ITestOutputHelper testOutputHelper)
- {
- this._testOutputHelper = testOutputHelper;
- this.TestInitialize();
- }
-
- public static void FeatureSetup()
- {
- testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
- TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Specification", "SaveEventsStream", "\tIn order to persist using an event stream\r\n\tAs a developer usint this new librar" +
- "y\r\n\tI want to be able to save events in a stream", ProgrammingLanguage.CSharp, featureTags);
- testRunner.OnFeatureStart(featureInfo);
- }
-
- public static void FeatureTearDown()
- {
- testRunner.OnFeatureEnd();
- testRunner = null;
- }
-
- public void TestInitialize()
- {
- }
-
- public void TestTearDown()
- {
- testRunner.OnScenarioEnd();
- }
-
- public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
- {
- testRunner.OnScenarioInitialize(scenarioInfo);
- testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testOutputHelper);
- }
-
- public void ScenarioStart()
- {
- testRunner.OnScenarioStart();
- }
-
- public void ScenarioCleanup()
- {
- testRunner.CollectScenarioErrors();
- }
-
- public virtual void FeatureBackground()
- {
-#line 6
-#line hidden
-#line 7
- testRunner.Given("the grpc protocol is being used", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
- }
-
- void System.IDisposable.Dispose()
- {
- this.TestTearDown();
- }
-
- [Xunit.SkippableTheoryAttribute(DisplayName="Save events in a new stream")]
- [Xunit.TraitAttribute("FeatureTitle", "SaveEventsStream")]
- [Xunit.TraitAttribute("Description", "Save events in a new stream")]
- [Xunit.InlineDataAttribute("1", new string[0])]
- [Xunit.InlineDataAttribute("30", new string[0])]
- [Xunit.InlineDataAttribute("10000", new string[0])]
- public void SaveEventsInANewStream(string eventsCount, string[] exampleTags)
- {
- string[] tagsOfScenario = exampleTags;
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- argumentsOfScenario.Add("eventsCount", eventsCount);
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Save events in a new stream", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 9
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 10
- testRunner.Given("a new stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 11
- testRunner.And(string.Format("{0} new events", eventsCount), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 12
- testRunner.When("I try to save the new events in the stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 13
- testRunner.Then("the save process should succeed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 14
- testRunner.And(string.Format("there should be {0} events in the stream", eventsCount), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="Save one event using interface")]
- [Xunit.TraitAttribute("FeatureTitle", "SaveEventsStream")]
- [Xunit.TraitAttribute("Description", "Save one event using interface")]
- public void SaveOneEventUsingInterface()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Save one event using interface", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 21
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 22
- testRunner.Given("a new stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 23
- testRunner.And("1 new event", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 24
- testRunner.When("I try to save the new events in the stream through their interface", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 25
- testRunner.Then("the save process should succeed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="Save additional events in an existing stream")]
- [Xunit.TraitAttribute("FeatureTitle", "SaveEventsStream")]
- [Xunit.TraitAttribute("Description", "Save additional events in an existing stream")]
- public void SaveAdditionalEventsInAnExistingStream()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Save additional events in an existing stream", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 27
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 28
- testRunner.Given("an existing stream with 10 events", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 29
- testRunner.And("10 new events", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 30
- testRunner.When("I try to save the new events in the stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 31
- testRunner.Then("the save process should succeed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 32
- testRunner.And("there should be 20 events in the stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="Concurrent write should fail for outdated session")]
- [Xunit.TraitAttribute("FeatureTitle", "SaveEventsStream")]
- [Xunit.TraitAttribute("Description", "Concurrent write should fail for outdated session")]
- public void ConcurrentWriteShouldFailForOutdatedSession()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Concurrent write should fail for outdated session", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 34
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 35
- testRunner.Given("an existing stream with 10 events", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 36
- testRunner.And("session \'Session1\' is open", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 37
- testRunner.And("session \'Session2\' is open", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 38
- testRunner.And("10 new events are added by \'Session1\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 39
- testRunner.And("10 new events are added by \'Session2\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 40
- testRunner.When("I try to save \'Session1\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 41
- testRunner.And("I try to save \'Session2\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 42
- testRunner.Then("the save process should succeed for \'Session1\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 43
- testRunner.And("the save process should fail for \'Session2\' with ConcurrencyException", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 44
- testRunner.And("there should be 20 events in the stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="Saving already saved session should throw meaningful usage advice exception")]
- [Xunit.TraitAttribute("FeatureTitle", "SaveEventsStream")]
- [Xunit.TraitAttribute("Description", "Saving already saved session should throw meaningful usage advice exception")]
- public void SavingAlreadySavedSessionShouldThrowMeaningfulUsageAdviceException()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Saving already saved session should throw meaningful usage advice exception", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 46
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 47
- testRunner.Given("an existing stream with 10 events", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 48
- testRunner.And("session \'Session1\' is open", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 49
- testRunner.And("10 new events are added by \'Session1\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 50
- testRunner.When("I try to save \'Session1\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 51
- testRunner.And("I try to save \'Session1\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 52
- testRunner.Then("the save process should fail for \'Session1\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 53
- testRunner.And("there should be 20 events in the stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="Write after a hard deleted stream should fail")]
- [Xunit.TraitAttribute("FeatureTitle", "SaveEventsStream")]
- [Xunit.TraitAttribute("Description", "Write after a hard deleted stream should fail")]
- public void WriteAfterAHardDeletedStreamShouldFail()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Write after a hard deleted stream should fail", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 55
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 56
- testRunner.Given("a new stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 57
- testRunner.And("3 new events", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 58
- testRunner.And("I hard-delete the stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 59
- testRunner.And("10 new events", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 60
- testRunner.When("I try to save the new events in the stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 61
- testRunner.Then("the save process should fail", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="Write after a soft deleted stream should succeed")]
- [Xunit.TraitAttribute("FeatureTitle", "SaveEventsStream")]
- [Xunit.TraitAttribute("Description", "Write after a soft deleted stream should succeed")]
- public void WriteAfterASoftDeletedStreamShouldSucceed()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Write after a soft deleted stream should succeed", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 63
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 64
- testRunner.Given("a new stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 65
- testRunner.And("3 new events", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 66
- testRunner.And("I soft-delete the stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 67
- testRunner.And("10 new events", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 68
- testRunner.When("I try to save the new events in the stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 69
- testRunner.And("I load my entity", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 70
- testRunner.Then("the load process should succeed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 71
- testRunner.And("HighOrder property should be 9", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableFactAttribute(DisplayName="When invariants fail no events are saved")]
- [Xunit.TraitAttribute("FeatureTitle", "SaveEventsStream")]
- [Xunit.TraitAttribute("Description", "When invariants fail no events are saved")]
- public void WhenInvariantsFailNoEventsAreSaved()
- {
- string[] tagsOfScenario = ((string[])(null));
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("When invariants fail no events are saved", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 73
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 74
- testRunner.Given("an always-fail invariant checker", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 75
- testRunner.And("an existing stream with 3 events", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 76
- testRunner.And("5 new events", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 77
- testRunner.When("I try to save the new events in the stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 78
- testRunner.And("I load my entity ignoring any errors", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 79
- testRunner.Then("the save process should fail", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 80
- testRunner.And("HighOrder property should be 2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [Xunit.SkippableTheoryAttribute(DisplayName="When invariants pass events are saved normally")]
- [Xunit.TraitAttribute("FeatureTitle", "SaveEventsStream")]
- [Xunit.TraitAttribute("Description", "When invariants pass events are saved normally")]
- [Xunit.InlineDataAttribute("3", "10", "5", "fail", "2", new string[0])]
- [Xunit.InlineDataAttribute("10", "20", "20", "succeed", "19", new string[0])]
- [Xunit.InlineDataAttribute("1", "5", "20", "succeed", "4", new string[0])]
- public void WhenInvariantsPassEventsAreSavedNormally(string existingCount, string newEventsCount, string maxHighOrder, string outcome, string expectedHighOrder, string[] exampleTags)
- {
- string[] tagsOfScenario = exampleTags;
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- argumentsOfScenario.Add("existingCount", existingCount);
- argumentsOfScenario.Add("newEventsCount", newEventsCount);
- argumentsOfScenario.Add("maxHighOrder", maxHighOrder);
- argumentsOfScenario.Add("outcome", outcome);
- argumentsOfScenario.Add("expectedHighOrder", expectedHighOrder);
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("When invariants pass events are saved normally", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 82
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 83
- testRunner.Given(string.Format("an invariant checker that allows a maximum higher order of {0}", maxHighOrder), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 84
- testRunner.And(string.Format("an existing stream with {0} events", existingCount), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 85
- testRunner.And(string.Format("{0} new events", newEventsCount), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 86
- testRunner.When("I try to save the new events in the stream", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 87
- testRunner.And("I load my entity ignoring any errors", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
-#line 88
- testRunner.Then(string.Format("the save process should {0}", outcome), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 89
- testRunner.And(string.Format("HighOrder property should be {0}", expectedHighOrder), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")]
- [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- public class FixtureData : System.IDisposable
- {
-
- public FixtureData()
- {
- SaveEventsStreamFeature.FeatureSetup();
- }
-
- void System.IDisposable.Dispose()
- {
- SaveEventsStreamFeature.FeatureTearDown();
- }
- }
- }
-}
-#pragma warning restore
-#endregion
diff --git a/src/BullOak.Repositories.EventStore.Test.Integration/Specification/StateRetreivalSpecs.feature.cs b/src/BullOak.Repositories.EventStore.Test.Integration/Specification/StateRetreivalSpecs.feature.cs
deleted file mode 100644
index 6ebac4f..0000000
--- a/src/BullOak.Repositories.EventStore.Test.Integration/Specification/StateRetreivalSpecs.feature.cs
+++ /dev/null
@@ -1,157 +0,0 @@
-// ------------------------------------------------------------------------------
-//
-// This code was generated by SpecFlow (https://www.specflow.org/).
-// SpecFlow Version:3.9.0.0
-// SpecFlow Generator Version:3.9.0.0
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-// ------------------------------------------------------------------------------
-#region Designer generated code
-#pragma warning disable
-namespace BullOak.Repositories.EventStore.Test.Integration.Specification
-{
- using TechTalk.SpecFlow;
- using System;
- using System.Linq;
-
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")]
- [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- public partial class StateRetrievalSpecsFeature : object, Xunit.IClassFixture, System.IDisposable
- {
-
- private static TechTalk.SpecFlow.ITestRunner testRunner;
-
- private static string[] featureTags = ((string[])(null));
-
- private Xunit.Abstractions.ITestOutputHelper _testOutputHelper;
-
-#line 1 "StateRetreivalSpecs.feature"
-#line hidden
-
- public StateRetrievalSpecsFeature(StateRetrievalSpecsFeature.FixtureData fixtureData, BullOak_Repositories_EventStore_Test_Integration_XUnitAssemblyFixture assemblyFixture, Xunit.Abstractions.ITestOutputHelper testOutputHelper)
- {
- this._testOutputHelper = testOutputHelper;
- this.TestInitialize();
- }
-
- public static void FeatureSetup()
- {
- testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
- TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Specification", "StateRetrievalSpecs", "\tIn order to implement complex logic without further state storage\r\n\tAs a develop" +
- "er using this library\r\n\tI want the current state to be updated immediately when " +
- "I add new events even if I don\'t save the session", ProgrammingLanguage.CSharp, featureTags);
- testRunner.OnFeatureStart(featureInfo);
- }
-
- public static void FeatureTearDown()
- {
- testRunner.OnFeatureEnd();
- testRunner = null;
- }
-
- public void TestInitialize()
- {
- }
-
- public void TestTearDown()
- {
- testRunner.OnScenarioEnd();
- }
-
- public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
- {
- testRunner.OnScenarioInitialize(scenarioInfo);
- testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testOutputHelper);
- }
-
- public void ScenarioStart()
- {
- testRunner.OnScenarioStart();
- }
-
- public void ScenarioCleanup()
- {
- testRunner.CollectScenarioErrors();
- }
-
- public virtual void FeatureBackground()
- {
-#line 6
-#line hidden
-#line 7
- testRunner.Given("the grpc protocol is being used", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
- }
-
- void System.IDisposable.Dispose()
- {
- this.TestTearDown();
- }
-
- [Xunit.SkippableTheoryAttribute(DisplayName="When I add new events in the stream I want the state to be updated immediately")]
- [Xunit.TraitAttribute("FeatureTitle", "StateRetrievalSpecs")]
- [Xunit.TraitAttribute("Description", "When I add new events in the stream I want the state to be updated immediately")]
- [Xunit.InlineDataAttribute("0", "3", "2", "2", new string[0])]
- [Xunit.InlineDataAttribute("2", "3", "2", "2", new string[0])]
- [Xunit.InlineDataAttribute("7", "5", "6", "4", new string[0])]
- [Xunit.InlineDataAttribute("0", "10000", "9999", "9999", new string[0])]
- public void WhenIAddNewEventsInTheStreamIWantTheStateToBeUpdatedImmediately(string eventCount, string addedEvents, string highOrder, string lastState, string[] exampleTags)
- {
- string[] tagsOfScenario = exampleTags;
- System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- argumentsOfScenario.Add("eventCount", eventCount);
- argumentsOfScenario.Add("addedEvents", addedEvents);
- argumentsOfScenario.Add("highOrder", highOrder);
- argumentsOfScenario.Add("lastState", lastState);
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("When I add new events in the stream I want the state to be updated immediately", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 14
-this.ScenarioInitialize(scenarioInfo);
-#line hidden
- if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags)))
- {
- testRunner.SkipScenario();
- }
- else
- {
- this.ScenarioStart();
-#line 6
-this.FeatureBackground();
-#line hidden
-#line 15
- testRunner.Given(string.Format("an existing stream with {0} events", eventCount), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
-#line hidden
-#line 16
- testRunner.When(string.Format("I add {0} events in the session without saving it", addedEvents), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
-#line hidden
-#line 17
- testRunner.Then(string.Format("HighOrder property should be {0}", highOrder), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
-#line hidden
-#line 18
- testRunner.And(string.Format("LastState property should be {0}", lastState), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
-#line hidden
- }
- this.ScenarioCleanup();
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")]
- [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- public class FixtureData : System.IDisposable
- {
-
- public FixtureData()
- {
- StateRetrievalSpecsFeature.FeatureSetup();
- }
-
- void System.IDisposable.Dispose()
- {
- StateRetrievalSpecsFeature.FeatureTearDown();
- }
- }
- }
-}
-#pragma warning restore
-#endregion
diff --git a/src/BullOak.Repositories.EventStore.Test.Integration/StepDefinitions/StreamStepsDefinitions.cs b/src/BullOak.Repositories.EventStore.Test.Integration/StepDefinitions/StreamStepsDefinitions.cs
index 23f2e8c..cb11d3e 100644
--- a/src/BullOak.Repositories.EventStore.Test.Integration/StepDefinitions/StreamStepsDefinitions.cs
+++ b/src/BullOak.Repositories.EventStore.Test.Integration/StepDefinitions/StreamStepsDefinitions.cs
@@ -172,8 +172,8 @@ public void ThenHighOrderPropertyForStreamShouldBe(int streamNumber, int highest
States.ElementAt(--streamNumber).state.HigherOrder.Should().Be(highestOrderValue);
}
- [Then(@"the visibilty should be disabled")]
- public void ThenTheVisibiltyShouldBeEnabled()
+ [Then(@"the visibility should be disabled")]
+ public void ThenTheVisibilityShouldBeEnabled()
{
testDataContexts.First().LatestLoadedState.Visility.Should().BeFalse();
}
diff --git a/src/BullOak.Repositories.EventStore.Test.Integration/StepDefinitions/TestsSetupAndTeardown.cs b/src/BullOak.Repositories.EventStore.Test.Integration/StepDefinitions/TestsSetupAndTeardown.cs
index a091c32..053b8cc 100644
--- a/src/BullOak.Repositories.EventStore.Test.Integration/StepDefinitions/TestsSetupAndTeardown.cs
+++ b/src/BullOak.Repositories.EventStore.Test.Integration/StepDefinitions/TestsSetupAndTeardown.cs
@@ -31,13 +31,7 @@ public void BeforeScenario()
[BeforeTestRun]
public static void SetupEventStoreNode()
{
- EventStoreIntegrationContext.SetupNode();
- }
-
- [AfterTestRun]
- public static void TeardownNode()
- {
- EventStoreIntegrationContext.TeardownNode();
+ EventStoreIntegrationContext.SetupConfiguration();
}
[Given(@"the (tcp|grpc) protocol is being used")]
diff --git a/src/BullOak.Repositories.EventStore.Test.Integration/appsettings.json b/src/BullOak.Repositories.EventStore.Test.Integration/appsettings.json
deleted file mode 100644
index 25be27a..0000000
--- a/src/BullOak.Repositories.EventStore.Test.Integration/appsettings.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- // EventStore server isolation.
- // -- None: expects eventstore server is running on localhost:1113
- // "EventStore.IsolationMode": "None",
- // Process: start a process using Command/Arguments settings below
- "EventStore.IsolationMode": "Process",
-
- // EventStore server process launch settings.
- // -- local EventStore copy (Windows only):
- "EventStore.Server.Command": "EventStoreServer/EventStore.ClusterNode.exe",
- "EventStore.Server.Arguments": "--run-projections=all --start-standard-projections=true"
- // -- dockerized instance (note: may leave EventStore running after tests finish):
- // "EventStore.Server.Command": "docker",
- // "EventStore.Server.Arguments": "run -it --rm --name eventstore-bulloak -p 2113:2113 -p 1113:1113 eventstore/eventstore:release-5.0.5"
-}
diff --git a/src/BullOak.Repositories.EventStore.Test.Unit/BullOak.Repositories.EventStore.Test.Unit.csproj b/src/BullOak.Repositories.EventStore.Test.Unit/BullOak.Repositories.EventStore.Test.Unit.csproj
index b81c9d5..d6fcfb8 100644
--- a/src/BullOak.Repositories.EventStore.Test.Unit/BullOak.Repositories.EventStore.Test.Unit.csproj
+++ b/src/BullOak.Repositories.EventStore.Test.Unit/BullOak.Repositories.EventStore.Test.Unit.csproj
@@ -11,7 +11,7 @@
-
+
all
diff --git a/src/BullOak.Repositories.EventStore/BullOak.Repositories.EventStore.csproj.DotSettings b/src/BullOak.Repositories.EventStore/BullOak.Repositories.EventStore.csproj.DotSettings
deleted file mode 100644
index 6162834..0000000
--- a/src/BullOak.Repositories.EventStore/BullOak.Repositories.EventStore.csproj.DotSettings
+++ /dev/null
@@ -1,2 +0,0 @@
-
- CSharp90
\ No newline at end of file
diff --git a/src/global.json b/src/global.json
new file mode 100644
index 0000000..2b7d34d
--- /dev/null
+++ b/src/global.json
@@ -0,0 +1,6 @@
+{
+ "sdk": {
+ "version": "6.0",
+ "rollForward": "latestFeature"
+ }
+}