Beispiel #1
0
        public void RenderDefault()
        {
            var @event = new SomeEventWithNoProps();

            eventFormatter.Format(null, @event);
            Assert.AreEqual("SomeEventWithNoProps", writer.Buffer);
        }
Beispiel #2
0
        public void RenderFixedTemplate()
        {
            var @event = new SomeEventWithNoProps();

            eventFormatter.Format("Template", @event);

            Assert.AreEqual(
                "Template [ root_id: ? / seq: ? / gl_seq: ? ]",
                writer.Buffer);
        }
Beispiel #3
0
        public void RenderDefaultsWithMetadata()
        {
            var @event = new SomeEventWithNoProps();

            @event.Meta[DomainEvent.MetadataKeys.AggregateRootId]      = "theid";
            @event.Meta[DomainEvent.MetadataKeys.SequenceNumber]       = "1";
            @event.Meta[DomainEvent.MetadataKeys.GlobalSequenceNumber] = "10";
            @event.Meta[DomainEvent.MetadataKeys.Type] = "I'm the silent type";

            eventFormatter.Format(null, @event);

            Assert.AreEqual(
                "SomeEventWithNoProps : root_id(theid), seq(1), gl_seq(10), type(I'm the silent type)",
                writer.Buffer);
        }