Skip to content

Commit b19b8b7

Browse files
committed
Merge branch 'develop'
2 parents 42509e5 + 5180eb4 commit b19b8b7

37 files changed

+938
-106
lines changed

EventFlow.sln

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.TestHelpers", "So
2727
EndProject
2828
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.Autofac", "Source\EventFlow.Autofac\EventFlow.Autofac.csproj", "{26F06682-3364-4C22-B9B2-2F2653D0BE0D}"
2929
EndProject
30+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EventStore", "EventStore", "{F6D62A27-50EA-4846-8F36-F3D36F52DCA6}"
31+
EndProject
32+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.EventStores.EventStore", "Source\EventFlow.EventStores.EventStore\EventFlow.EventStores.EventStore.csproj", "{E42A253D-2011-4799-B55D-1D0C61E171C2}"
33+
EndProject
34+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.EventStores.EventStore.Tests", "Source\EventFlow.EventStores.EventStore.Tests\EventFlow.EventStores.EventStore.Tests.csproj", "{BC4F0E41-6659-4D6D-9D25-1558CBA1649B}"
35+
EndProject
3036
Global
3137
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3238
Debug|Any CPU = Debug|Any CPU
@@ -73,6 +79,14 @@ Global
7379
{26F06682-3364-4C22-B9B2-2F2653D0BE0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
7480
{26F06682-3364-4C22-B9B2-2F2653D0BE0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
7581
{26F06682-3364-4C22-B9B2-2F2653D0BE0D}.Release|Any CPU.Build.0 = Release|Any CPU
82+
{E42A253D-2011-4799-B55D-1D0C61E171C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
83+
{E42A253D-2011-4799-B55D-1D0C61E171C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
84+
{E42A253D-2011-4799-B55D-1D0C61E171C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
85+
{E42A253D-2011-4799-B55D-1D0C61E171C2}.Release|Any CPU.Build.0 = Release|Any CPU
86+
{BC4F0E41-6659-4D6D-9D25-1558CBA1649B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
87+
{BC4F0E41-6659-4D6D-9D25-1558CBA1649B}.Debug|Any CPU.Build.0 = Debug|Any CPU
88+
{BC4F0E41-6659-4D6D-9D25-1558CBA1649B}.Release|Any CPU.ActiveCfg = Release|Any CPU
89+
{BC4F0E41-6659-4D6D-9D25-1558CBA1649B}.Release|Any CPU.Build.0 = Release|Any CPU
7690
EndGlobalSection
7791
GlobalSection(SolutionProperties) = preSolution
7892
HideSolutionNode = FALSE
@@ -84,5 +98,7 @@ Global
8498
{A6F6232B-764F-4428-9EB5-CC98BE4F5E90} = {E4FC24C0-3EB3-4203-B4F2-0B534B42574A}
8599
{EE6F7B78-3EF1-488F-B90A-8E7F350B7D51} = {9876C758-0A72-400E-A1B1-685E1C22ACB2}
86100
{2F3A5BCA-5336-4BB1-BA3D-0FEEA78C0415} = {9876C758-0A72-400E-A1B1-685E1C22ACB2}
101+
{E42A253D-2011-4799-B55D-1D0C61E171C2} = {F6D62A27-50EA-4846-8F36-F3D36F52DCA6}
102+
{BC4F0E41-6659-4D6D-9D25-1558CBA1649B} = {F6D62A27-50EA-4846-8F36-F3D36F52DCA6}
87103
EndGlobalSection
88104
EndGlobal

RELEASE_NOTES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
### New in 0.8 (not released yet)
1+
### New in 0.9 (not released yet)
2+
3+
* Braking: `IEventStore.LoadAllEventsAsync` and `IEventStore.LoadAllEvents`
4+
now take a `GlobalPosition` as an argument instead of a `long` for the
5+
starting position. The `GlobalPosition` is basically a wrapper around a
6+
string that hides the inner workings of each event store.
7+
* New: NuGet package `EventFlow.EventStores.EventStore` that provides
8+
integration to [Event Store](https://geteventstore.com/). Its an initial
9+
version and shouldn't be used in production.
10+
11+
### New in 0.8.560 (released 2015-05-29)
212

313
* Breaking: Remove _all_ functionality related to global sequence
414
numbers as it proved problematic to maintain. It also matches this
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{BC4F0E41-6659-4D6D-9D25-1558CBA1649B}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>EventFlow.EventStores.EventStore.Tests</RootNamespace>
11+
<AssemblyName>EventFlow.EventStores.EventStore.Tests</AssemblyName>
12+
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<DebugSymbols>true</DebugSymbols>
17+
<DebugType>full</DebugType>
18+
<Optimize>false</Optimize>
19+
<OutputPath>bin\Debug\</OutputPath>
20+
<DefineConstants>DEBUG;TRACE</DefineConstants>
21+
<ErrorReport>prompt</ErrorReport>
22+
<WarningLevel>4</WarningLevel>
23+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<DebugType>pdbonly</DebugType>
27+
<Optimize>true</Optimize>
28+
<OutputPath>bin\Release\</OutputPath>
29+
<DefineConstants>TRACE</DefineConstants>
30+
<ErrorReport>prompt</ErrorReport>
31+
<WarningLevel>4</WarningLevel>
32+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
33+
</PropertyGroup>
34+
<ItemGroup>
35+
<Reference Include="EventStore.ClientAPI, Version=3.0.2.0, Culture=neutral, processorArchitecture=MSIL">
36+
<HintPath>..\..\packages\EventStore.Client.3.0.2\lib\net40\EventStore.ClientAPI.dll</HintPath>
37+
<Private>True</Private>
38+
</Reference>
39+
<Reference Include="FluentAssertions, Version=3.3.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
40+
<HintPath>..\..\packages\FluentAssertions.3.3.0\lib\net45\FluentAssertions.dll</HintPath>
41+
<Private>True</Private>
42+
</Reference>
43+
<Reference Include="FluentAssertions.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
44+
<HintPath>..\..\packages\FluentAssertions.3.3.0\lib\net45\FluentAssertions.Core.dll</HintPath>
45+
<Private>True</Private>
46+
</Reference>
47+
<Reference Include="Moq, Version=4.2.1502.911, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
48+
<HintPath>..\..\packages\Moq.4.2.1502.0911\lib\net40\Moq.dll</HintPath>
49+
<Private>True</Private>
50+
</Reference>
51+
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
52+
<HintPath>..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
53+
<Private>True</Private>
54+
</Reference>
55+
<Reference Include="Ploeh.AutoFixture, Version=3.24.3.0, Culture=neutral, PublicKeyToken=b24654c590009d4f, processorArchitecture=MSIL">
56+
<HintPath>..\..\packages\AutoFixture.3.24.3\lib\net40\Ploeh.AutoFixture.dll</HintPath>
57+
<Private>True</Private>
58+
</Reference>
59+
<Reference Include="Ploeh.AutoFixture.AutoMoq, Version=3.24.3.0, Culture=neutral, PublicKeyToken=b24654c590009d4f, processorArchitecture=MSIL">
60+
<HintPath>..\..\packages\AutoFixture.AutoMoq.3.24.3\lib\net40\Ploeh.AutoFixture.AutoMoq.dll</HintPath>
61+
<Private>True</Private>
62+
</Reference>
63+
<Reference Include="System" />
64+
<Reference Include="System.Core" />
65+
<Reference Include="System.Xml.Linq" />
66+
<Reference Include="System.Data.DataSetExtensions" />
67+
<Reference Include="Microsoft.CSharp" />
68+
<Reference Include="System.Data" />
69+
<Reference Include="System.Xml" />
70+
</ItemGroup>
71+
<ItemGroup>
72+
<Compile Include="IntegrationTests\EventStoreEventStoreTestConfiguration.cs" />
73+
<Compile Include="IntegrationTests\EventStoreEventStoreTests.cs" />
74+
<Compile Include="Properties\AssemblyInfo.cs" />
75+
</ItemGroup>
76+
<ItemGroup>
77+
<ProjectReference Include="..\EventFlow.EventStores.EventStore\EventFlow.EventStores.EventStore.csproj">
78+
<Project>{e42a253d-2011-4799-b55d-1d0c61e171c2}</Project>
79+
<Name>EventFlow.EventStores.EventStore</Name>
80+
</ProjectReference>
81+
<ProjectReference Include="..\EventFlow.TestHelpers\EventFlow.TestHelpers.csproj">
82+
<Project>{571d291c-5e4c-43af-855f-7c4e2f318f4c}</Project>
83+
<Name>EventFlow.TestHelpers</Name>
84+
</ProjectReference>
85+
<ProjectReference Include="..\EventFlow\EventFlow.csproj">
86+
<Project>{11131251-778d-4d2e-bdd1-4844a789bca9}</Project>
87+
<Name>EventFlow</Name>
88+
</ProjectReference>
89+
</ItemGroup>
90+
<ItemGroup>
91+
<None Include="app.config" />
92+
<None Include="packages.config" />
93+
</ItemGroup>
94+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
95+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
96+
Other similar extension points exist, see Microsoft.Common.targets.
97+
<Target Name="BeforeBuild">
98+
</Target>
99+
<Target Name="AfterBuild">
100+
</Target>
101+
-->
102+
</Project>
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
// The MIT License (MIT)
2+
//
3+
// Copyright (c) 2015 Rasmus Mikkelsen
4+
// https://github.com/rasmus/EventFlow
5+
//
6+
// Permission is hereby granted, free of charge, to any person obtaining a copy of
7+
// this software and associated documentation files (the "Software"), to deal in
8+
// the Software without restriction, including without limitation the rights to
9+
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
10+
// the Software, and to permit persons to whom the Software is furnished to do so,
11+
// subject to the following conditions:
12+
//
13+
// The above copyright notice and this permission notice shall be included in all
14+
// copies or substantial portions of the Software.
15+
//
16+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18+
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19+
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20+
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21+
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22+
23+
using System.Net;
24+
using System.Threading;
25+
using System.Threading.Tasks;
26+
using EventFlow.Aggregates;
27+
using EventFlow.Configuration;
28+
using EventFlow.EventStores.EventStore.Extensions;
29+
using EventFlow.Extensions;
30+
using EventFlow.MetadataProviders;
31+
using EventFlow.Queries;
32+
using EventFlow.ReadStores;
33+
using EventFlow.TestHelpers;
34+
using EventFlow.TestHelpers.Aggregates.Test.ReadModels;
35+
using EventStore.ClientAPI;
36+
using EventStore.ClientAPI.SystemData;
37+
38+
namespace EventFlow.EventStores.EventStore.Tests.IntegrationTests
39+
{
40+
public class EventStoreEventStoreTestConfiguration : IntegrationTestConfiguration
41+
{
42+
private IQueryProcessor _queryProcessor;
43+
private IReadModelPopulator _readModelPopulator;
44+
45+
public override IRootResolver CreateRootResolver(EventFlowOptions eventFlowOptions)
46+
{
47+
var connectionSettings = ConnectionSettings.Create()
48+
.EnableVerboseLogging()
49+
.KeepReconnecting()
50+
.SetDefaultUserCredentials(new UserCredentials("admin", "changeit"))
51+
.Build();
52+
53+
var resolver = eventFlowOptions
54+
.UseInMemoryReadStoreFor<InMemoryTestAggregateReadModel>()
55+
.AddMetadataProvider<AddGuidMetadataProvider>()
56+
.UseEventStoreEventStore(new IPEndPoint(IPAddress.Loopback, 1113), connectionSettings)
57+
.CreateResolver();
58+
59+
_queryProcessor = resolver.Resolve<IQueryProcessor>();
60+
_readModelPopulator = resolver.Resolve<IReadModelPopulator>();
61+
62+
return resolver;
63+
}
64+
65+
public override async Task<ITestAggregateReadModel> GetTestAggregateReadModelAsync(IIdentity id)
66+
{
67+
return await _queryProcessor.ProcessAsync(new ReadModelByIdQuery<InMemoryTestAggregateReadModel>(id.Value), CancellationToken.None).ConfigureAwait(false);
68+
}
69+
70+
public override Task PurgeTestAggregateReadModelAsync()
71+
{
72+
return _readModelPopulator.PurgeAsync<InMemoryTestAggregateReadModel>(CancellationToken.None);
73+
}
74+
75+
public override Task PopulateTestAggregateReadModelAsync()
76+
{
77+
return _readModelPopulator.PopulateAsync<InMemoryTestAggregateReadModel>(CancellationToken.None);
78+
}
79+
80+
public override void TearDown()
81+
{
82+
}
83+
}
84+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// The MIT License (MIT)
2+
//
3+
// Copyright (c) 2015 Rasmus Mikkelsen
4+
// https://github.com/rasmus/EventFlow
5+
//
6+
// Permission is hereby granted, free of charge, to any person obtaining a copy of
7+
// this software and associated documentation files (the "Software"), to deal in
8+
// the Software without restriction, including without limitation the rights to
9+
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
10+
// the Software, and to permit persons to whom the Software is furnished to do so,
11+
// subject to the following conditions:
12+
//
13+
// The above copyright notice and this permission notice shall be included in all
14+
// copies or substantial portions of the Software.
15+
//
16+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18+
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19+
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20+
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21+
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22+
23+
using EventFlow.TestHelpers.Suites;
24+
using NUnit.Framework;
25+
26+
namespace EventFlow.EventStores.EventStore.Tests.IntegrationTests
27+
{
28+
[Explicit("EventStore from https://geteventstore.com/ required to run")]
29+
public class EventStoreEventStoreTests : EventStoreSuite<EventStoreEventStoreTestConfiguration>
30+
{
31+
}
32+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("EventFlow.EventStores.EventStore.Tests")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("EventFlow.EventStores.EventStore.Tests")]
13+
[assembly: AssemblyCopyright("Copyright © 2015")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("ac245842-8abb-4b58-8db1-6d83eb9e2ffa")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<runtime>
4+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5+
<dependentAssembly>
6+
<assemblyIdentity name="Moq" publicKeyToken="69f491c39445e920" culture="neutral" />
7+
<bindingRedirect oldVersion="0.0.0.0-4.2.1502.911" newVersion="4.2.1502.911" />
8+
</dependentAssembly>
9+
</assemblyBinding>
10+
</runtime>
11+
</configuration>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="AutoFixture" version="3.24.3" targetFramework="net451" />
4+
<package id="AutoFixture.AutoMoq" version="3.24.3" targetFramework="net451" />
5+
<package id="EventStore.Client" version="3.0.2" targetFramework="net451" />
6+
<package id="FluentAssertions" version="3.3.0" targetFramework="net451" />
7+
<package id="Moq" version="4.2.1502.0911" targetFramework="net451" />
8+
<package id="NUnit" version="2.6.4" targetFramework="net451" />
9+
</packages>

0 commit comments

Comments
 (0)