Skip to content

Commit

Permalink
Merge pull request #162 from binarymash/feature/#159-package-update
Browse files Browse the repository at this point in the history
Feature/#159 package update
  • Loading branch information
binarymash committed Mar 14, 2019
2 parents 26452aa + 3a10702 commit da2eb61
Show file tree
Hide file tree
Showing 15 changed files with 56 additions and 80 deletions.
2 changes: 1 addition & 1 deletion build.cake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#tool "nuget:?package=GitVersion.CommandLine"
#tool "nuget:?package=OpenCover&version=4.6.832"
#tool "nuget:?package=OpenCover&version=4.7.922"
#tool "nuget:?package=ReportGenerator"
#tool "nuget:?package=GitReleaseNotes"
#addin "nuget:?package=Cake.DoInDirectory"
Expand Down
3 changes: 0 additions & 3 deletions cake.config
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
; The configuration file for Cake.

[Nuget]
Source=https://www.myget.org/F/binarymash-unstable/api/v2;https://api.nuget.org/v3/index.json
2 changes: 1 addition & 1 deletion src/Evelyn.Client.Host/Evelyn.Client.Host.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.1.2-alpha" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
<PackageReference Include="Serilog" Version="2.7.1" />
<PackageReference Include="Serilog" Version="2.8.0" />
<PackageReference Include="Serilog.Extensions.Logging" Version="2.0.2" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2">
Expand Down
9 changes: 5 additions & 4 deletions src/Evelyn.Client.Tests/Evelyn.Client.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoFixture" Version="4.6.0" />
<PackageReference Include="FluentAssertions" Version="5.5.3" />
<PackageReference Include="AutoFixture" Version="4.8.0" />
<PackageReference Include="FluentAssertions" Version="5.6.0" />
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.1.2-alpha" />
<PackageReference Include="Microsoft.Extensions.Options" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="NSubstitute" Version="3.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="NSubstitute" Version="4.0.0" />
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.6" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2" />
<PackageReference Include="TestStack.BDDfy" Version="4.3.2" />
<PackageReference Include="xunit" Version="2.4.1" />
Expand Down
13 changes: 7 additions & 6 deletions src/Evelyn.Core.Tests/Evelyn.Core.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoFixture" Version="4.6.0" />
<PackageReference Include="CompareNETObjects" Version="4.57.0" />
<PackageReference Include="FluentAssertions" Version="5.5.3" />
<PackageReference Include="AutoFixture" Version="4.8.0" />
<PackageReference Include="CompareNETObjects" Version="4.58.0" />
<PackageReference Include="FluentAssertions" Version="5.6.0" />
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.1.2-alpha" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="NSubstitute" Version="3.1.0" />
<PackageReference Include="Polly" Version="6.1.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="NSubstitute" Version="4.0.0" />
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.6" />
<PackageReference Include="Polly" Version="7.1.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2" />
<PackageReference Include="TestStack.BDDfy" Version="4.3.2" />
<PackageReference Include="xunit" Version="2.4.1" />
Expand Down
4 changes: 2 additions & 2 deletions src/Evelyn.Core/Evelyn.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CqrsLite" Version="0.26.0" />
<PackageReference Include="FluentValidation" Version="8.1.2" />
<PackageReference Include="CqrsLite" Version="0.27.0" />
<PackageReference Include="FluentValidation" Version="8.1.3" />
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.1.2-alpha">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoFixture" Version="4.6.0" />
<PackageReference Include="FluentAssertions" Version="5.5.3" />
<PackageReference Include="Flurl.Http" Version="2.4.0" />
<PackageReference Include="AutoFixture" Version="4.8.0" />
<PackageReference Include="FluentAssertions" Version="5.6.0" />
<PackageReference Include="Flurl.Http" Version="2.4.1" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="2.2.0" />
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.1.2-alpha" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Polly" Version="6.1.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.6" />
<PackageReference Include="Polly" Version="7.1.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2" />
<PackageReference Include="TestStack.BDDfy" Version="4.3.2" />
<PackageReference Include="xunit" Version="2.4.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoFixture" Version="4.6.0" />
<PackageReference Include="FluentAssertions" Version="5.5.3" />
<PackageReference Include="AutoFixture" Version="4.8.0" />
<PackageReference Include="FluentAssertions" Version="5.6.0" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.1.2-alpha" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="NSubstitute" Version="3.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="NSubstitute" Version="4.0.0" />
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.6" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2" />
<PackageReference Include="TestStack.BDDfy" Version="4.3.2" />
<PackageReference Include="xunit" Version="2.4.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CqrsLite" Version="0.26.0" />
<PackageReference Include="FluentValidation" Version="8.1.2" />
<PackageReference Include="CqrsLite" Version="0.27.0" />
<PackageReference Include="FluentValidation" Version="8.1.3" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.1.2-alpha">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
<PackageReference Include="Scrutor" Version="3.0.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2">
<PrivateAssets>all</PrivateAssets>
Expand Down
2 changes: 1 addition & 1 deletion src/Evelyn.Server.Host/Evelyn.Server.Host.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CqrsLite" Version="0.26.0" />
<PackageReference Include="CqrsLite" Version="0.27.0" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.1.2-alpha">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net472</TargetFramework>
<IsPackable>false</IsPackable>
<CodeAnalysisRuleSet>..\codeanalysis.ruleset</CodeAnalysisRuleSet>
<Version>0.0.0-dev</Version>
Expand All @@ -25,14 +25,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoFixture" Version="4.6.0" />
<PackageReference Include="EventStore.Client.Embedded" Version="4.1.1" />
<PackageReference Include="EventStore.ClientAPI.NetCore" Version="4.1.0.23" />
<PackageReference Include="FluentAssertions" Version="5.5.3" />
<PackageReference Include="AutoFixture" Version="4.8.0" />
<PackageReference Include="EventStore.Client" Version="5.0.1" />
<PackageReference Include="EventStore.Client.Embedded" Version="5.0.0" />
<PackageReference Include="FluentAssertions" Version="5.6.0" />
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.1.2-alpha" />
<PackageReference Include="Microsoft.Extensions.Options" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="NSubstitute" Version="3.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="NSubstitute" Version="4.0.0" />
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.6" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2" />
<PackageReference Include="TestStack.BDDfy" Version="4.3.2" />
<PackageReference Include="xunit" Version="2.4.1" />
Expand All @@ -53,20 +54,5 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<Target Name="ChangeAssemblyAliases" BeforeTargets="FindReferenceAssembliesForReferences;ResolveReferences">
<ItemGroup>
<!-- -->
<ReferencePath Condition="'%(FileName)' == 'EventStore.ClientAPI.Embedded'">
<Aliases>EmbeddedES</Aliases>
</ReferencePath>
<ReferencePath Condition="'%(FileName)' == 'EventStore.ClientAPI'">
<Aliases>EmbeddedES</Aliases>
</ReferencePath>
<ReferencePath Condition="'%(FileName)' == 'EventStore.ClientAPI.NetCore'">
<Aliases>NetCoreES</Aliases>
</ReferencePath>
</ItemGroup>
</Target>

</Project>
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
namespace Evelyn.Storage.EventStore.Tests
{
extern alias EmbeddedES;
extern alias NetCoreES;

using System;
using System.Collections.Generic;
using System.Linq;
Expand All @@ -14,7 +11,6 @@ namespace Evelyn.Storage.EventStore.Tests
using FluentAssertions;
using TestStack.BDDfy;
using Xunit;
using RecordedEvent = EmbeddedES::EventStore.ClientAPI.RecordedEvent;

public class EventStoreImplementationSpecs : EventStoreSpecs
{
Expand Down Expand Up @@ -225,7 +221,7 @@ private async Task ThenTheStoredEventStreamIsNamedByAggregateRootIdWithEvelynPre
result.Events.Should().HaveCount(EventsAddedToStore.Count);
}

private async Task<EmbeddedES::EventStore.ClientAPI.StreamEventsSlice> GetProjectAggregateRootStream(Guid id)
private async Task<global::EventStore.ClientAPI.StreamEventsSlice> GetProjectAggregateRootStream(Guid id)
{
var expectedStreamName = $"evelyn-{_aggregateId}";
return await ManagementConnection.ReadStreamEventsForwardAsync(expectedStreamName, 0, 2000, false);
Expand All @@ -240,7 +236,7 @@ private async Task ThenTheStoredEventTypesAreTheFullNameOfTheEvent()
}
}

private void ThenTheStoredEventTypeIsTheFullNameOfTheEvent(RecordedEvent @event, Type type)
private void ThenTheStoredEventTypeIsTheFullNameOfTheEvent(global::EventStore.ClientAPI.RecordedEvent @event, Type type)
{
@event.EventType.Should().Be(type.FullName);
}
Expand Down
31 changes: 12 additions & 19 deletions src/Evelyn.Storage.EventStore.Tests/EventStoreSpecs.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
namespace Evelyn.Storage.EventStore.Tests
{
extern alias EmbeddedES;
extern alias NetCoreES;

using System;
using System.Collections.Generic;
using System.Threading;
using AutoFixture;
using Core.WriteModel;
using CQRSlite.Events;
using EmbeddedES::EventStore.Common.Options;
using EmbeddedES::EventStore.Core.Bus;
using EmbeddedES::EventStore.Core.Messages;
using NetCoreES::EventStore.ClientAPI.SystemData;

public abstract class EventStoreSpecs : IDisposable
{
Expand All @@ -26,9 +19,9 @@ protected EventStoreSpecs()

protected Fixture DataFixture { get; }

protected EmbeddedES::EventStore.Core.ClusterVNode Server { get; private set; }
protected global::EventStore.Core.ClusterVNode Server { get; private set; }

protected EmbeddedES::EventStore.ClientAPI.IEventStoreConnection ManagementConnection { get; private set; }
protected global::EventStore.ClientAPI.IEventStoreConnection ManagementConnection { get; private set; }

protected List<IEvent> EventsAddedToStore { get; }

Expand All @@ -44,18 +37,18 @@ private void EnsureCoreAssemblyIsLoaded()

private void BootstrapEmbeddedEventStore()
{
Server = EmbeddedES::EventStore.ClientAPI.Embedded.EmbeddedVNodeBuilder
Server = global::EventStore.ClientAPI.Embedded.EmbeddedVNodeBuilder
.AsSingleNode()
.RunInMemory()
.RunProjections(ProjectionType.All)
.RunProjections(global::EventStore.Common.Options.ProjectionType.All)
.OnDefaultEndpoints()
.StartStandardProjections()
.AddExternalHttpPrefix("http://*:2113/")
.Build();

var startedEvent = new ManualResetEventSlim(false);
Server.MainBus.Subscribe(
new AdHocHandler<UserManagementMessage.UserManagementServiceInitialized>(m => startedEvent.Set()));
new global::EventStore.Core.Bus.AdHocHandler<global::EventStore.Core.Messages.UserManagementMessage.UserManagementServiceInitialized>(m => startedEvent.Set()));

Server.Start();

Expand All @@ -64,12 +57,12 @@ private void BootstrapEmbeddedEventStore()
throw new TimeoutException("Embedded Event Store has not started in 60 seconds.");
}

var connectionSettings = EmbeddedES::EventStore.ClientAPI.ConnectionSettings
var connectionSettings = global::EventStore.ClientAPI.ConnectionSettings
.Create()
.SetDefaultUserCredentials(new EmbeddedES::EventStore.ClientAPI.SystemData.UserCredentials("admin", "changeit"))
.SetDefaultUserCredentials(new global::EventStore.ClientAPI.SystemData.UserCredentials("admin", "changeit"))
.Build();

ManagementConnection = EmbeddedES::EventStore.ClientAPI.Embedded.EmbeddedEventStoreConnection.Create(Server, connectionSettings);
ManagementConnection = global::EventStore.ClientAPI.Embedded.EmbeddedEventStoreConnection.Create(Server, connectionSettings);
ManagementConnection.ConnectAsync().GetAwaiter().GetResult();
}

Expand All @@ -85,16 +78,16 @@ private void TearDownEmbeddedEventStore()

protected class EventStoreConnectionFactory : IEventStoreConnectionFactory
{
public NetCoreES::EventStore.ClientAPI.IEventStoreConnection Invoke()
public global::EventStore.ClientAPI.IEventStoreConnection Invoke()
{
var connectionSettings = NetCoreES::EventStore.ClientAPI.ConnectionSettings
var connectionSettings = global::EventStore.ClientAPI.ConnectionSettings
.Create()
.SetDefaultUserCredentials(new UserCredentials("admin", "changeit"))
.SetDefaultUserCredentials(new global::EventStore.ClientAPI.SystemData.UserCredentials("admin", "changeit"))
.Build();

var uri = new Uri("tcp://127.0.0.1:1113");

return NetCoreES::EventStore.ClientAPI.EventStoreConnection.Create(connectionSettings, uri);
return global::EventStore.ClientAPI.EventStoreConnection.Create(connectionSettings, uri);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CqrsLite" Version="0.26.0" />
<PackageReference Include="EventStore.ClientAPI.NetCore" Version="4.1.0.23" />
<PackageReference Include="CqrsLite" Version="0.27.0" />
<PackageReference Include="EventStore.Client" Version="5.0.1" />
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.1.2-alpha">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion src/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:
timeout: 2s

eventstore:
image: eventstore/eventstore:release-4.1.0
image: eventstore/eventstore:release-5.0.0
environment:
EVENTSTORE_DISABLE_HTTP_CACHING: "True"
EVENTSTORE_START_STANDARD_PROJECTIONS: "True"
Expand Down

0 comments on commit da2eb61

Please sign in to comment.