Exemplo n.º 1
0
        public void SetValueAtEventArgs_ctor_default_values()
        {
            string expectedOldValue = "Old Foo";
            string expectedNewValue = "New Foo";
            int expectedIndex = 10;

            SetValueAtEventArgs<string> obj = new SetValueAtEventArgs<string>( expectedIndex, expectedNewValue, expectedOldValue );

            Assert.IsFalse( obj.Cancel );
            Assert.AreEqual<int>( expectedIndex, obj.Index );
            Assert.AreEqual<string>( expectedNewValue, obj.NewValue );
            Assert.AreEqual<string>( expectedOldValue, obj.OldValue );
        }
Exemplo n.º 2
0
        public void SetValueAtEventArgs_ctor_default_values()
        {
            string expectedOldValue = "Old Foo";
            string expectedNewValue = "New Foo";
            int    expectedIndex    = 10;

            SetValueAtEventArgs <string> obj = new SetValueAtEventArgs <string>(expectedIndex, expectedNewValue, expectedOldValue);

            Assert.IsFalse(obj.Cancel);
            Assert.AreEqual <int>(expectedIndex, obj.Index);
            Assert.AreEqual <string>(expectedNewValue, obj.NewValue);
            Assert.AreEqual <string>(expectedOldValue, obj.OldValue);
        }