Skip to content

Commit

Permalink
Improve naming to make room for other EF providers (e.g. #44)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Lycken committed Dec 5, 2017
1 parent 6b5e0c9 commit d958e4f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ namespace RdbmsEventStore.EntityFramework.Tests.EventStoreTests
public class ExtraMetaTests : IClassFixture<ExtraMetaEventFactoryFixture>
{
private readonly ExtraMetaEventFactoryFixture _fixture;
private readonly EventStoreContext<ExtraMetaLongStringPersistedEventMetadata> _dbContext;
private readonly EntityFrameworkEventStoreContext<ExtraMetaLongStringPersistedEventMetadata> _dbContext;

// ReSharper disable once UnusedParameter.Local
public ExtraMetaTests(ExtraMetaEventFactoryFixture fixture, AssemblyInitializerFixture _)
{
EffortProviderFactory.ResetDb();
_fixture = fixture;
_dbContext = new EventStoreContext<ExtraMetaLongStringPersistedEventMetadata>();
_dbContext = new EntityFrameworkEventStoreContext<ExtraMetaLongStringPersistedEventMetadata>();

var stream1 = _fixture.EventFactory.Create("stream-1", 0, new object[] {
new FooEvent { Foo = "Foo" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public async Task CommittingWithOutOfSyncDataThrowsConflictException()

[Fact]
public async Task CommittingNoEventsExitsEarly() {
var context = new Mock<EventStoreContext<GuidGuidPersistedEvent>>(MockBehavior.Strict);
var context = new Mock<EntityFrameworkEventStoreContext<GuidGuidPersistedEvent>>(MockBehavior.Strict);
var set = new Mock<DbSet<GuidGuidPersistedEvent>>(MockBehavior.Strict);
context.Setup(c => c.Set<GuidGuidPersistedEvent>()).Returns(set.Object);
var stream = Guid.NewGuid();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ public class EventStoreTestBase<TId, TStreamId, TEvent, TEventMetadata, TPersist
where TPersistedEvent : class, TEventMetadata, IPersistedEvent<TStreamId>, new()
{
protected readonly EventStoreFixture<TId, TStreamId, TEvent, TEventMetadata, TPersistedEvent> _fixture;
protected readonly EventStoreContext<TPersistedEvent> _dbContext;
protected readonly EntityFrameworkEventStoreContext<TPersistedEvent> _dbContext;

public EventStoreTestBase(EventStoreFixture<TId, TStreamId, TEvent, TEventMetadata, TPersistedEvent> fixture, AssemblyInitializerFixture initializer)
{
EffortProviderFactory.ResetDb();
_fixture = fixture;
_dbContext = new EventStoreContext<TPersistedEvent>();
_dbContext = new EntityFrameworkEventStoreContext<TPersistedEvent>();
}

public void Dispose()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System.Data.Entity;

namespace RdbmsEventStore.EntityFramework
{
public class EntityFrameworkEventStoreContext<TEvent> : DbContext, IEventDbContext<TEvent>
where TEvent : class
{
public EntityFrameworkEventStoreContext() { }
public EntityFrameworkEventStoreContext(string connectionInfo) : base(connectionInfo) { }
public DbSet<TEvent> Events { get; set; }
}
}
12 changes: 0 additions & 12 deletions src/RdbmsEventStore.EntityFramework/EventStoreContext.cs

This file was deleted.

0 comments on commit d958e4f

Please sign in to comment.