コード例 #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);
        }