public TriggerSignal(double? signal, double? progress, PointAndKeyValue? pointAndKeyValue) : this() { Signal = signal; Progress = progress; PointAndKeyValue = pointAndKeyValue; }
public TriggerSignal(double?signal, double?progress, PointAndKeyValue pointAndKeyValue) : this() { Signal = signal; Progress = progress; PointAndKeyValue = pointAndKeyValue; }
private void PublishSelection(PointAndKeyValue selection) { if (selectionEvent != null) { Log.DebugFormat("Publishing Selection event with PointAndKeyValue:{0}", selection); selectionEvent(this, selection); } }
public void ThenSelectionProgressShouldBeProcessed() { var pointAndKeyValue = new PointAndKeyValue(new Point(), new KeyValue()); InputService.Raise(s => s.Selection += null, this, pointAndKeyValue); Assert.IsNull(MainViewModel.SelectionResultPoints); Assert.IsTrue(IsPointSelectionEventHandlerCalled); }
public void ThenPointSelectionProgressShouldBeSet() { var pointAndKeyValue = new PointAndKeyValue(new Point(), new KeyValue()); InputService.Raise(s => s.SelectionProgress += null, this, new Tuple <PointAndKeyValue, double>( pointAndKeyValue, 83)); Assert.IsNotNull(MainViewModel.PointSelectionProgress); Assert.AreEqual(pointAndKeyValue.Point, MainViewModel.PointSelectionProgress.Item1); Assert.AreEqual(83, MainViewModel.PointSelectionProgress.Item2); }
public void ThenSelectionProgressShouldBeProcessed() { var pointAndKeyValue = new PointAndKeyValue(new Point(), new KeyValue()); InputService.Raise(s => s.Selection += null, this, pointAndKeyValue); Assert.IsNull(MainViewModel.SelectionResultPoints); AudioService.Verify(s => s.PlaySound(Settings.Default.KeySelectionSoundFile, Settings.Default.KeySelectionSoundVolume)); Assert.IsTrue(IsKeySelectionEventHandlerCalled); }
public void ThenSelectionProgressShouldBeProcessed() { var pointAndKeyValue = new PointAndKeyValue(new Point(), new KeyValue()); InputService.Raise(s => s.Selection += null, this, pointAndKeyValue); Assert.Multiple(() => { Assert.That(MainViewModel.SelectionResultPoints, Is.Null); Assert.That(IsPointSelectionEventHandlerCalled, Is.True); }); }
public void ThenPointSelectionProgressShouldBeSet() { var pointAndKeyValue = new PointAndKeyValue(new Point(), new KeyValue()); InputService.Raise(s => s.SelectionProgress += null, this, new Tuple <PointAndKeyValue, double>( pointAndKeyValue, 83)); Assert.That(MainViewModel.PointSelectionProgress, Is.Not.Null); Assert.Multiple(() => { Assert.That(MainViewModel.PointSelectionProgress.Item1, Is.EqualTo(pointAndKeyValue.Point)); Assert.That(MainViewModel.PointSelectionProgress.Item2, Is.EqualTo(83)); }); }