public async Task It_produces_commandHandled_only_for_root_command()
        {
            await _standardIOKernelServer.WriteAsync(new SubmitCode("display(1543); display(4567);"));

            _events.Should()
            .ContainSingle(e => e["eventType"].Value <string>() == nameof(CommandHandled));
        }
Beispiel #2
0
        public async Task Kernel_produces_only_commandHandled_for_root_command()
        {
            await _kernelClient.Start();

            var gate = _io.OutputStream
                       .TakeUntilCommandHandled();

            _io.WriteToInput(new SubmitCode("display(1543); display(4567);"), 0);

            await gate;

            _events.Should()
            .ContainSingle(e => e["eventType"].Value <string>() == nameof(CommandHandled));
        }
Beispiel #3
0
        public async Task It_produces_a_unique_CommandHandled_for_root_command()
        {
            var command = new SubmitCode("%%time\ndisplay(1543); display(4567);");

            command.SetToken("abc");

            await _standardIOKernelServer.WriteAsync(command);

            _kernelEvents
            .Should()
            .ContainSingle <KernelEventEnvelope <CommandHandled> >()
            .Which
            .Event
            .Command
            .GetToken()
            .Should()
            .Be("abc");
        }