-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensured that the memory event store doesn't shallow projection except…
…ions
- Loading branch information
1 parent
f817965
commit f366df5
Showing
6 changed files
with
77 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -181,4 +181,5 @@ Build/** | |
Tools/** | ||
|
||
# Visual Studio | ||
.vs/ | ||
**/.vs/** | ||
.vs/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Chill; | ||
using FluentAssertions; | ||
using LiquidProjections.Testing; | ||
using Xunit; | ||
|
||
namespace LiquidProjections.Specs | ||
{ | ||
namespace MemoryEventSourceSpecs | ||
{ | ||
public class When_a_subscriber_throws_an_exception_that_the_dispatcher_rethrows : GivenSubject<Dispatcher> | ||
{ | ||
public When_a_subscriber_throws_an_exception_that_the_dispatcher_rethrows() | ||
{ | ||
Given(() => | ||
{ | ||
UseThe(new MemoryEventSource()); | ||
WithSubject(_ => new Dispatcher(The<MemoryEventSource>().Subscribe) | ||
{ | ||
ExceptionHandler = (exception, attempts, info) => throw exception | ||
}); | ||
Subject.Subscribe(null, (transaction, info) => | ||
{ | ||
throw new ArgumentException(); | ||
}); | ||
}); | ||
|
||
WhenLater(() => | ||
{ | ||
return The<MemoryEventSource>().Write(new List<Transaction> | ||
{ | ||
new Transaction() | ||
}); | ||
}); | ||
} | ||
|
||
[Fact] | ||
public void Then_the_exception_should_bubble_up_through_the_memory_event_source() | ||
{ | ||
WhenAction.Should().Throw<ArgumentException>(); | ||
} | ||
} | ||
|
||
} | ||
} |