public void LogicalOrCommandTest() { SwitchVM switchOne = new SwitchVM(); SwitchVM switchTwo = new SwitchVM(); LogicalBaseVM or = LogicalBaseVM.CreateLogicalOr(); ICommand switchingSwitchOne = switchOne.SwitchingCommand; switchingSwitchOne.Execute(null); ICommand selectSignalCommand = switchOne.SelectSignalCommand; selectSignalCommand.Execute(null); selectSignalCommand = or.SelectSignalCommand; selectSignalCommand.Execute(or.InputSignals[0]); selectSignalCommand = or.SelectSignalCommand; selectSignalCommand.Execute(or.InputSignals[1]); selectSignalCommand = switchTwo.SelectSignalCommand; selectSignalCommand.Execute(null); Assert.AreEqual(true, or.OutputSignals[0].SignalValue); }
public LogicalOrControl(Int32 numberInputs = 2) { InitializeComponent(); DataContext = LogicalBaseVM.CreateLogicalOr(numberInputs); }