From c7e12525b4299dbf7741e5cd4a133ba7b782512b Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Wed, 1 Nov 2017 19:08:08 +0100 Subject: [PATCH] Build fixed. --- tests/Benchmarks/Tests/HandleEvents.cs | 2 +- .../Tests/HandleEventsWithManyWriters.cs | 2 +- .../Actors/ActorRemoteTests.cs | 2 +- .../CQRS/Events/EventDataFormatterTests.cs | 4 ++-- .../TypeNameRegistryTests.cs | 18 +++++++++--------- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/Benchmarks/Tests/HandleEvents.cs b/tests/Benchmarks/Tests/HandleEvents.cs index f4f77fcc8..75c552af2 100644 --- a/tests/Benchmarks/Tests/HandleEvents.cs +++ b/tests/Benchmarks/Tests/HandleEvents.cs @@ -21,7 +21,7 @@ namespace Benchmarks.Tests public sealed class HandleEvents : IBenchmark { private const int NumEvents = 5000; - private readonly TypeNameRegistry typeNameRegistry = new TypeNameRegistry().MapUnmapped(typeof(MyEvent)); + private readonly TypeNameRegistry typeNameRegistry = new TypeNameRegistry().Map(typeof(MyEvent)); private readonly EventDataFormatter formatter; private readonly JsonSerializerSettings serializerSettings = new JsonSerializerSettings(); private IMongoClient mongoClient; diff --git a/tests/Benchmarks/Tests/HandleEventsWithManyWriters.cs b/tests/Benchmarks/Tests/HandleEventsWithManyWriters.cs index b5ac6ae76..548cb8d2c 100644 --- a/tests/Benchmarks/Tests/HandleEventsWithManyWriters.cs +++ b/tests/Benchmarks/Tests/HandleEventsWithManyWriters.cs @@ -23,7 +23,7 @@ namespace Benchmarks.Tests { private const int NumCommits = 200; private const int NumStreams = 10; - private readonly TypeNameRegistry typeNameRegistry = new TypeNameRegistry().MapUnmapped(typeof(MyEvent)); + private readonly TypeNameRegistry typeNameRegistry = new TypeNameRegistry().Map(typeof(MyEvent)); private readonly EventDataFormatter formatter; private readonly JsonSerializerSettings serializerSettings = new JsonSerializerSettings(); private IMongoClient mongoClient; diff --git a/tests/Squidex.Infrastructure.Tests/Actors/ActorRemoteTests.cs b/tests/Squidex.Infrastructure.Tests/Actors/ActorRemoteTests.cs index ae6c6516a..e53df6eac 100644 --- a/tests/Squidex.Infrastructure.Tests/Actors/ActorRemoteTests.cs +++ b/tests/Squidex.Infrastructure.Tests/Actors/ActorRemoteTests.cs @@ -49,7 +49,7 @@ namespace Squidex.Infrastructure.Actors public ActorRemoteTests() { - registry.MapUnmapped(typeof(SuccessMessage)); + registry.Map(typeof(SuccessMessage)); actors = new RemoteActors(new DefaultRemoteActorChannel(new InMemoryPubSub(), registry)); actors.Connect("my", actor); diff --git a/tests/Squidex.Infrastructure.Tests/CQRS/Events/EventDataFormatterTests.cs b/tests/Squidex.Infrastructure.Tests/CQRS/Events/EventDataFormatterTests.cs index a57896f2b..7e07d5dd4 100644 --- a/tests/Squidex.Infrastructure.Tests/CQRS/Events/EventDataFormatterTests.cs +++ b/tests/Squidex.Infrastructure.Tests/CQRS/Events/EventDataFormatterTests.cs @@ -40,8 +40,8 @@ namespace Squidex.Infrastructure.CQRS.Events { serializerSettings.Converters.Add(new PropertiesBagConverter()); - typeNameRegistry.MapUnmapped(typeof(MyEvent), "Event"); - typeNameRegistry.MapUnmapped(typeof(MyOldEvent), "OldEvent"); + typeNameRegistry.Map(typeof(MyEvent), "Event"); + typeNameRegistry.Map(typeof(MyOldEvent), "OldEvent"); sut = new EventDataFormatter(typeNameRegistry, serializerSettings); } diff --git a/tests/Squidex.Infrastructure.Tests/TypeNameRegistryTests.cs b/tests/Squidex.Infrastructure.Tests/TypeNameRegistryTests.cs index 9dffaa860..0f65a5191 100644 --- a/tests/Squidex.Infrastructure.Tests/TypeNameRegistryTests.cs +++ b/tests/Squidex.Infrastructure.Tests/TypeNameRegistryTests.cs @@ -30,7 +30,7 @@ namespace Squidex.Infrastructure [Fact] public void Should_register_and_retrieve_types() { - sut.MapUnmapped(typeof(int), "NumberField"); + sut.Map(typeof(int), "NumberField"); Assert.Equal("NumberField", sut.GetName()); Assert.Equal("NumberField", sut.GetName(typeof(int))); @@ -42,7 +42,7 @@ namespace Squidex.Infrastructure [Fact] public void Should_register_from_attribute() { - sut.MapUnmapped(typeof(MyType)); + sut.Map(typeof(MyType)); Assert.Equal("my", sut.GetName()); Assert.Equal("my", sut.GetName(typeof(MyType))); @@ -78,7 +78,7 @@ namespace Squidex.Infrastructure [Fact] public void Should_register_fallback_name() { - sut.MapUnmapped(typeof(MyType)); + sut.Map(typeof(MyType)); sut.MapObsolete(typeof(MyType), "my-old"); Assert.Equal(typeof(MyType), sut.GetType("my")); @@ -88,24 +88,24 @@ namespace Squidex.Infrastructure [Fact] public void Should_not_throw_exception_if_type_is_already_registered_with_same_name() { - sut.MapUnmapped(typeof(long), "long"); - sut.MapUnmapped(typeof(long), "long"); + sut.Map(typeof(long), "long"); + sut.Map(typeof(long), "long"); } [Fact] public void Should_throw_exception_if_type_is_already_registered() { - sut.MapUnmapped(typeof(long), "long"); + sut.Map(typeof(long), "long"); - Assert.Throws(() => sut.MapUnmapped(typeof(long), "longer")); + Assert.Throws(() => sut.Map(typeof(long), "longer")); } [Fact] public void Should_throw_exception_if_name_is_already_registered() { - sut.MapUnmapped(typeof(short), "short"); + sut.Map(typeof(short), "short"); - Assert.Throws(() => sut.MapUnmapped(typeof(byte), "short")); + Assert.Throws(() => sut.Map(typeof(byte), "short")); } [Fact]