public void GivenAnAggregateAContextAndAMessageInstanceIsReturnedWithAllPropertiesPropagated()
        {
            var          aggregate = new SerializableEventCentricAggregateRoot();
            var          context   = new SerializableMessage();
            const string Message   = "Something something dark side.";

            var exception = new SerializableDomainException <SerializableEventCentricAggregateRoot>(
                context,
                aggregate,
                Message);

            Assert.Equal(aggregate.ToReference(), exception.Aggregate);
            Assert.Equal(context, exception.Context);
            Assert.Equal(Message, exception.Message);
        }
        public void GivenAnInstanceThenAllPropertiesAreSerialized()
        {
            var          aggregate = new SerializableEventCentricAggregateRoot();
            var          context   = new SerializableMessage();
            const string Message   = "Something something dark side.";

            var original = new SerializableDomainException <SerializableEventCentricAggregateRoot>(
                context,
                aggregate,
                Message);

            SerializableDomainException <SerializableEventCentricAggregateRoot> deserialized = original.Clone();

            Assert.NotSame(original, deserialized);
            Assert.Equal(original.Aggregate, deserialized.Aggregate);
            Assert.Equal(original.Context, deserialized.Context);
            Assert.Equal(original.Message, deserialized.Message);
        }