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

				eventBubbler.ValueChanged += delegate
				{
					_valueChangedCount.Inc();
				};
			}
Example #2
0
            public EventSink(NuGenPositiveInt32 eventBubbler)
            {
                Assert.IsNotNull(eventBubbler);

                eventBubbler.ValueChanged += delegate
                {
                    _valueChangedCount.Inc();
                };
            }
Example #3
0
        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));
		}
Example #5
0
        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));
		}
Example #7
0
        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));
        }
Example #8
0
 public void SetUp()
 {
     _int       = new NuGenPositiveInt32();
     _eventSink = new EventSink(_int);
 }
		public void SetUp()
		{
			_int = new NuGenPositiveInt32();
			_eventSink = new EventSink(_int);
		}
		public void SetUp()
		{
			_int = new NuGenPositiveInt32();
		}
Example #11
0
 public void SetUp()
 {
     _int = new NuGenPositiveInt32();
 }