Exemple #1
0
        // TODO: Change test structure so that this can be inlined
        internal static void Run(Stream stdin, Stream stdout)
        {
            var stdoutWriter = new StdoutWriter(stdout, new Utf8JsonWriter(stdout, new() {
                Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
            }));

            var flowWriter = new FlowWriter(stdoutWriter, new Utf8ValuePresenter());

            SetupRuntimeServices(flowWriter, stdoutWriter);

            var executeCommandHandler = new ExecuteCommandHandler(flowWriter, stdoutWriter);
            var shouldExit            = false;

            while (!shouldExit)
            {
                var command = Serializer.DeserializeWithLengthPrefix <ExecuteCommand?>(stdin, PrefixStyle.Base128);
                if (command == null)
                {
                    break; // end-of-input
                }
                executeCommandHandler.Execute(command);
            }
        }
Exemple #2
0
 public void TestExecuteShouldReturnIfLinkColumnIsNull()
 {
     _layout.LinkColumn = null;
     _handler.Execute(new ExecuteCommand(_row.Id));
     _mockProcess.Verify(p => p.Start(It.IsAny <string>()), Times.Never());
 }