Example #1
0
        public async Task NullStatus(string command, string[] expected)
        {
            var completer = new TabCompleter(Task.FromResult<IRepositoryStatus>(null));
            var fullResult = await completer.CompleteAsync(command, CancellationToken.None);
            var result = GetResult(fullResult);

            Assert.Equal(result, expected.OrderBy(o => o, StringComparer.Ordinal));
        }
        public async Task NullStatus(string command, string[] expected)
        {
            var completer  = new TabCompleter(Task.FromResult <IRepositoryStatus>(null));
            var fullResult = await completer.CompleteAsync(command, CancellationToken.None);

            var result = GetResult(fullResult);

            Assert.Equal(result, expected.OrderBy(o => o, StringComparer.Ordinal));
        }
Example #3
0
        public async Task GitCommand(string cmd)
        {
            var repo = Substitute.For<IRepositoryStatus>();
            var completer = new TabCompleter(Task.FromResult(repo));

            var result = await completer.CompleteAsync(cmd, CancellationToken.None);

            Assert.True(result.IsFailure);
        }
        public async Task GitCommand(string cmd)
        {
            var repo      = Substitute.For <IRepositoryStatus>();
            var completer = new TabCompleter(Task.FromResult(repo));

            var result = await completer.CompleteAsync(cmd, CancellationToken.None);

            Assert.True(result.IsFailure);
        }