public EventSink(NuGenNonNegativeInt32 eventBubbler)
			{
				Assert.IsNotNull(eventBubbler);

				eventBubbler.ValueChanged += delegate
				{
					_valueChangedCount.Inc();
				};
			}
            public EventSink(NuGenNonNegativeInt32 eventBubbler)
            {
                Assert.IsNotNull(eventBubbler);

                eventBubbler.ValueChanged += delegate
                {
                    _valueChangedCount.Inc();
                };
            }
示例#3
0
        public void NonNegativeInt32ToInt32CastTest()
        {
            NuGenNonNegativeInt32 nonNegativeInt32 = new NuGenNonNegativeInt32();

            nonNegativeInt32.Value = 1;

            NuGenInt32 int32 = nonNegativeInt32;

            Assert.AreEqual(1, int32.Value);
        }
		public void EqualsTest()
		{
			_eventSink.ExpectedValueChangedCount = 2;

			NuGenNonNegativeInt32 compared = new NuGenNonNegativeInt32();
			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;

            NuGenNonNegativeInt32 compared = new NuGenNonNegativeInt32();

            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 NuGenNonNegativeInt32();
     _eventSink = new EventSink(_int);
 }
		public void SetUp()
		{
			_int = new NuGenNonNegativeInt32();
			_eventSink = new EventSink(_int);
		}