Beispiel #1
0
        public void WorkWithMessage()
        {
            var reader = new SequenceReader <byte>();
            var err    = (NatsError)NatsError.ParseMessage(new NatsMemoryPool(), _withErrorMessage.Span, ref reader);

            Assert.Equal("Stale Connection", err.Error);
        }
Beispiel #2
0
        public void WorkWithoutMessage()
        {
            var reader = new SequenceReader <byte>();
            var err    = (NatsError)NatsError.ParseMessage(new NatsMemoryPool(), _withoutErrorMessage.Span, ref reader);

            Assert.Null(err.Error);
        }
Beispiel #3
0
        public void ReturnNatsError()
        {
            var reader = new SequenceReader <byte>();
            var err    = NatsError.ParseMessage(new NatsMemoryPool(), _withErrorMessage.Span, ref reader);

            Assert.IsType <NatsError>(err);
        }