Skip to content

Commit

Permalink
- v4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eben-roux committed Oct 2, 2016
1 parent 5e8c5c3 commit ee537e5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
21 changes: 12 additions & 9 deletions Shuttle.Recall.Tests/EventProcessing/EventProcessorFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,19 @@ public void Should_be_able_to_create_projections()
{
ProjectionService = serviceMock.Object,
});
var eventProjection = new EventProjection("Test");

var projectionName = "Test";

var eventProjection = new EventProjection(projectionName);
var handler = new FakeEventHandler();

serviceMock.Setup(m => m.GetEvent(0)).Returns(FakeEvent(new FakeEvent1 {PropertyOne = "value0"}, 0));
serviceMock.Setup(m => m.GetEvent(1)).Returns(FakeEvent(new FakeEvent1 {PropertyOne = "value1"}, 1));
serviceMock.Setup(m => m.GetEvent(2)).Returns(FakeEvent(new FakeEvent2 {PropertyTwo = "value2"}, 2));
serviceMock.Setup(m => m.GetEvent(3)).Returns(FakeEvent(new FakeEvent1 {PropertyOne = "value3"}, 3));
serviceMock.Setup(m => m.GetEvent(4)).Returns(FakeEvent(new FakeEvent2 {PropertyTwo = "value4"}, 4));
serviceMock.Setup(m => m.GetEvent(5)).Returns(FakeEvent(new FakeEvent1 {PropertyOne = "[done]"}, 5));
serviceMock.Setup(m => m.GetEvent(6)).Returns((ProjectionEvent) null);
serviceMock.Setup(m => m.GetEvent(projectionName, 0)).Returns(FakeEvent(new FakeEvent1 {PropertyOne = "value0"}, 0));
serviceMock.Setup(m => m.GetEvent(projectionName, 1)).Returns(FakeEvent(new FakeEvent1 {PropertyOne = "value1"}, 1));
serviceMock.Setup(m => m.GetEvent(projectionName, 2)).Returns(FakeEvent(new FakeEvent2 {PropertyTwo = "value2"}, 2));
serviceMock.Setup(m => m.GetEvent(projectionName, 3)).Returns(FakeEvent(new FakeEvent1 {PropertyOne = "value3"}, 3));
serviceMock.Setup(m => m.GetEvent(projectionName, 4)).Returns(FakeEvent(new FakeEvent2 {PropertyTwo = "value4"}, 4));
serviceMock.Setup(m => m.GetEvent(projectionName, 5)).Returns(FakeEvent(new FakeEvent1 {PropertyOne = "[done]"}, 5));
serviceMock.Setup(m => m.GetEvent(projectionName, 6)).Returns((ProjectionEvent) null);

var position = new Queue<int>();

Expand All @@ -43,7 +46,7 @@ public void Should_be_able_to_create_projections()
position.Enqueue(i);
}

serviceMock.Setup(m => m.GetSequenceNumber("Test")).Returns(() => position.Count > 0 ? position.Dequeue() : 6);
serviceMock.Setup(m => m.GetSequenceNumber(projectionName)).Returns(() => position.Count > 0 ? position.Dequeue() : 6);

eventProjection.AddEventHandler(handler);

Expand Down
4 changes: 2 additions & 2 deletions Shuttle.Recall/EventProcessing/IProjectionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public interface IProjectionService
{
long GetSequenceNumber(string name);
void SetSequenceNumber(string name, long sequenceNumber);
ProjectionEvent GetEvent(long sequenceNumber);
ProjectionEvent GetEvent(long sequenceNumber, IEnumerable<Type> eventTypes);
ProjectionEvent GetEvent(string name, long sequenceNumber);
ProjectionEvent GetEvent(string name, long sequenceNumber, IEnumerable<Type> eventTypes);
}
}
4 changes: 2 additions & 2 deletions Shuttle.Recall/EventProcessing/Pipeline/GetEventObserver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public void Execute(OnGetEvent pipelineEvent)
var projection = state.Get<IEventProjection>();

var eventRead = projection.HasExplicitTypes
? projectionService.GetEvent(projectionService.GetSequenceNumber(projection.Name), projection.ExplicitTypes)
: projectionService.GetEvent(projectionService.GetSequenceNumber(projection.Name));
? projectionService.GetEvent(projection.Name, projectionService.GetSequenceNumber(projection.Name), projection.ExplicitTypes)
: projectionService.GetEvent(projection.Name, projectionService.GetSequenceNumber(projection.Name));

if (eventRead == null)
{
Expand Down
4 changes: 2 additions & 2 deletions Shuttle.Recall/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
[assembly: AssemblyTitle("Shuttle.Recall for .NET Framework 4.6.1")]
#endif

[assembly: AssemblyVersion("3.6.2.0")]
[assembly: AssemblyVersion("4.0.0.0")]
[assembly: AssemblyCopyright("Copyright © Eben Roux 2016")]
[assembly: AssemblyProduct("Shuttle.Recall")]
[assembly: AssemblyCompany("Shuttle")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyInformationalVersion("3.6.2")]
[assembly: AssemblyInformationalVersion("4.0.0")]
[assembly: ComVisible(false)]

0 comments on commit ee537e5

Please sign in to comment.