예제 #1
0
        public void Valid_returns_all_dirs()
        {
            var options = new GetGitChangeDirectoryCommandOptions {
                List = true
            };
            var testCmd = new ActionList(_repoPaths, options, _hitManager);

            var result = testCmd.Process(_info);

            Assert.True(result);

            _hitManager.Received(1).GetHitList();
            Assert.NotNull(_info.ListData);
            Assert.True(GcdTestHelper.AreSame(_AllHitData, _info.ListData));
        }
예제 #2
0
        public void Path_HandleMultiTarget()
        {
            var options = new GetGitChangeDirectoryCommandOptions {
                NameOrAlias = "SomeRandomName"
            };
            var testCmd = new ActionNameOrAlias(_repoPaths, options, _hitManager);

            var result = testCmd.Process(_info);

            Assert.True(result);

            _hitManager.Received(1).GetHitList();
            Assert.True(GcdTestHelper.AreSame(_AllHitData, _info.ListData));
            Assert.Null(_info.TargetDirectory);
            Assert.True(_info.Options.List);
            Assert.True(_info.PromptForListSelector);
        }