Beispiel #1
0
        public void SetUp()
        {
            var fakeCommand = MockRepository.GenerateMock <ICommand>();

            accessor = new OptionAccessor(fakeCommand);

            accessor.ExtendOptions(new Option
            {
                Name              = "list",
                DeclarableOnly    = true,
                OverrideExecution = true,
                Permanent         = true
            }, new Option
            {
                Name = "test"
            });
            accessor.AddOptionValue("list", true);
        }
Beispiel #2
0
 public void Test_AddOptionValueThrowsUndefinedCommandOptionException()
 {
     // Assert
     Assert.Throws <UndefinedCommandOption>(() => accessor.AddOptionValue("help"));
 }