Example #1
0
        public void AggregateException_should_be_serializable()
        {
            var ex = new AggregateException(new MessageHandleException(new BalloonTitleChanged("123", Guid.NewGuid().ToString())));

            var serializer = new DebugHyperionSerializer((ExtendedActorSystem)TestActorSystem.Create());
            var bytes      = serializer.ToBinary(ex);

            var restored = (AggregateException)serializer.FromBinary(bytes, typeof(AggregateException));

            Assert.IsType <MessageHandleException>(restored.UnwrapSingle());
        }
Example #2
0
        public void Message_Envelop_should_be_serializable()
        {
            var evt   = new BalloonTitleChanged("123", Guid.NewGuid().ToString());
            var fault = new Fault <BalloonTitleChanged>(evt, new Exception(), typeof(object), Guid.NewGuid().ToString(), DateTime.Now);
            //Fault
            //ballonTitleChanged
            var msg        = new MessageMetadataEnvelop <Fault <BalloonTitleChanged> >(fault, MessageMetadata.Empty);
            var serializer = new DebugHyperionSerializer((ExtendedActorSystem)TestActorSystem.Create());

            var bytes    = serializer.ToBinary(msg);
            var restored = serializer.FromBinary(bytes, typeof(MessageMetadataEnvelop <Fault <BalloonTitleChanged> >));

            Assert.NotNull(restored);
        }