public EventSink(NuGenPositiveInt32 eventBubbler) { Assert.IsNotNull(eventBubbler); eventBubbler.ValueChanged += delegate { _valueChangedCount.Inc(); }; }
public void PositiveInt32ToInt32CastTest() { NuGenPositiveInt32 positiveInt32 = new NuGenPositiveInt32(); positiveInt32.Value = 1; NuGenInt32 int32 = positiveInt32; Assert.AreEqual(1, int32.Value); }
public void EqualsTest() { NuGenPositiveInt32 compared = new NuGenPositiveInt32(); compared.Value = 20; _int.Value = 20; Assert.IsTrue(_int.Equals(compared)); _int.Value = 30; Assert.IsFalse(_int.Equals(compared)); Assert.IsFalse(_int.Equals(null)); }
public void EqualsTest() { _eventSink.ExpectedValueChangedCount = 2; NuGenPositiveInt32 compared = new NuGenPositiveInt32(); compared.Value = 20; _int.Value = 20; Assert.IsTrue(_int.Equals(compared)); _int.Value = 30; Assert.IsFalse(_int.Equals(compared)); Assert.IsFalse(_int.Equals(null)); }
public void SetUp() { _int = new NuGenPositiveInt32(); _eventSink = new EventSink(_int); }
public void SetUp() { _int = new NuGenPositiveInt32(); }