public void Initial_NumberChangedOnce_SumIsCorrect() { var args = new NumberChangedEventArgs() { Number = 4 }; _numberSource.NumberChanged += Raise.EventWith(args); Assert.That(_sum, Is.EqualTo(4)); }
public void Initial_NumberChangedTwiceSecondTimeIsZero_NumberOfEventsReceivedIsCorrect0() { var args = new NumberChangedEventArgs() { Number = 4 }; _numberSource.NumberChanged += Raise.EventWith(args); args.Number = 0; _numberSource.NumberChanged += Raise.EventWith(args); Assert.That(_nEventsReceived, Is.EqualTo(1)); }
public void Initial_NumberChangedTwiceSecondTimeIsZero_SumIsCorrect() { var args = new NumberChangedEventArgs() { Number = 4 }; _numberSource.NumberChanged += Raise.EventWith(args); args.Number = 0; _numberSource.NumberChanged += Raise.EventWith(args); Assert.That(_sum, Is.EqualTo(4)); }
/// <summary> /// Изменение элемента по индексу /// </summary> private static void RealNumbersChangedByIndex(object sender, NumberChangedEventArgs e) { Console.WriteLine($"Элемент {e.Index} изменен на {e.Value}"); }