public void CanGetTypeById() { KeyFormat.For <int>("i-{Username}"); KeyFormat.For <double>("d-guid"); KeyFormat.GetTypeById("d-9EA4FEC2-AA9F-460A-A2B7-60903218149D").ShouldBe(typeof(double)); }
public void FailsWhenRegisteringTypesWithNoLiteralIdentifier() { Should.Throw <ParseException>(() => { KeyFormat.For <object>("guid-sguid-{placeholder}-*"); }); }
public void EmitToAnyStream() { KeyFormat.For <object>("stream-*"); Emit <object>("stream-id", new EventWithNoRoot()); var @event = Context.History.Single(); @event.ShouldBeOfType <EventWithNoRoot>(); @event.Meta[DomainEvent.MetadataKeys.AggregateRootId].ShouldBe("stream-id"); @event.Meta[DomainEvent.MetadataKeys.Owner].ShouldBe("System.Object, mscorlib"); }
public IdTests() { KeyFormat.For <GuidKeyedRoot>("hest-guid"); KeyFormat.For <PlaceholderKeyedRoot>("hest-{String}-{Int}-{Long}-*"); }