示例#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);
        }
示例#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);
        }
示例#3
0
        public void ReturnNatsError()
        {
            var reader = new SequenceReader <byte>();
            var err    = NatsError.ParseMessage(new NatsMemoryPool(), _withErrorMessage.Span, ref reader);

            Assert.IsType <NatsError>(err);
        }