public ReadkeyCommandTests() { this.platformFacade = Substitute.For<IPlatformFacade>(); this.platformFacade.RegisterHotKey(Keys.None, 0).ReturnsForAnyArgs(true); this.keyMapService = new KeyMapService(this.platformFacade); this.mainWindow = Substitute.For<IMainWindow>(); }
public DefinekeyCommandTests() { this.platformFacade = Substitute.For<IPlatformFacade>(); this.keyMapService = new KeyMapService(this.platformFacade); var commandStub = new ICommandStub { Args = "arg1", Name = "testCommand", Help = "sample help!" }; var commandHandlerStub = new ICommandHandlerStub { ExpectedCommandArgs = commandStub.Args, ExpectedCommandName = commandStub.Name, ExpectedCommandHelp = commandStub.Help, ExpectedExecuteResult = () => true }; this.commandService = new CommandService( new List<ICommand> { commandStub }, new List<object> { commandHandlerStub }); }
public NewKMapCommandTests() { this.platformFacade = NSubstitute.Substitute.For<IPlatformFacade>(); this.keyMapService = new KeyMapService(this.platformFacade); }
public DelKMapCommandTests() { this.platformFacade = Substitute.For<IPlatformFacade>(); this.platformFacade.UnregisterHotKey(0).ReturnsForAnyArgs(true); this.keyMapService = new KeyMapService(this.platformFacade); }