public async Task GetsAsyncConversationError() { const string errorMessage = "Foo bar"; var conv = new CommandConversation(CommandType.Run); var responseMessage = ErrorResponseBuilder.Build(errorMessage); ICoreLink coreLink = GenerateCoreLink(responseMessage); var ex = await Assert.ThrowsAsync <RemoteCoreException>(() => coreLink.Request(conv, WaitMs)); Assert.Equal(errorMessage, ex.Message); }
public void WritesReadsStateResponseError() { var message = ErrorResponseBuilder.Build("foo"); Assert.Equal("foo", message.GetResponse(new ErrorResponse()).Message); }