public void Subtract()
        {
            SqlByte testByte12  = new SqlByte(12);
            SqlByte testByte128 = new SqlByte(128);

            Assert.Equal((byte)116, SqlByte.Subtract(testByte128, testByte12).Value);

            Assert.Throws <OverflowException>(() => SqlByte.Subtract(testByte12, testByte128));
        }
Exemple #2
0
        public void Subtract()
        {
            SqlByte TestByte12  = new SqlByte(12);
            SqlByte TestByte128 = new SqlByte(128);

            Assert.AreEqual((byte)116, SqlByte.Subtract(TestByte128, TestByte12).Value, "Subtract method 1" + Error);

            try {
                SqlByte.Subtract(TestByte12, TestByte128);
            } catch (Exception e) {
                Assert.AreEqual(typeof(OverflowException), e.GetType(), "OverflowException");
            }
        }
Exemple #3
0
        public void Subtract()
        {
            SqlByte TestByte12  = new SqlByte(12);
            SqlByte TestByte128 = new SqlByte(128);

            Assert.Equal((byte)116, SqlByte.Subtract(TestByte128, TestByte12).Value);

            try
            {
                SqlByte.Subtract(TestByte12, TestByte128);
            }
            catch (Exception e)
            {
                Assert.Equal(typeof(OverflowException), e.GetType());
            }
        }