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); }
public void WorkWithoutMessage() { var reader = new SequenceReader <byte>(); var err = (NatsError)NatsError.ParseMessage(new NatsMemoryPool(), _withoutErrorMessage.Span, ref reader); Assert.Null(err.Error); }
public void ReturnNatsError() { var reader = new SequenceReader <byte>(); var err = NatsError.ParseMessage(new NatsMemoryPool(), _withErrorMessage.Span, ref reader); Assert.IsType <NatsError>(err); }