예제 #1
0
        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);
        }
예제 #2
0
        public void WritesReadsStateResponseError()
        {
            var message = ErrorResponseBuilder.Build("foo");

            Assert.Equal("foo", message.GetResponse(new ErrorResponse()).Message);
        }