Пример #1
0
        [TestCase("13", "7", "5", 13, 7, 5)]                     // Can handle both size and precision together.
        public void SetColumnSizeAndNumericalAndScalePrecision(
            object columnSizeInput,
            object precisionInput,
            object scaleInput,
            int expectedColumnSize,
            int expectedPrecision,
            int expectedScale)
        {
            // The *Input above is supposed to be either null or strings.

            if (columnSizeInput == null)
            {
                columnSizeInput = DBNull.Value;
            }
            if (precisionInput == null)
            {
                precisionInput = DBNull.Value;
            }

            var column = new TestableColumnMetaData(null, columnSizeInput, precisionInput, scaleInput);

            Assert.AreEqual(expectedColumnSize, column.ColumnSize);
            Assert.AreEqual(expectedPrecision, column.NumericalPrecision);
            Assert.AreEqual(expectedScale, column.NumericalScale);
        }
		[TestCase("13", "7", 13, 7)]  // Can handle both size and precision together.
		public void SetColumnSizeAndNumericalPrecision(object columnSizeInput, object precisionInput,
			int expectedColumnSize, int expectedPrecision)
		{
			// The *Input above is supposed to be either null or strings.

			if (columnSizeInput == null)
				columnSizeInput = DBNull.Value;
			if (precisionInput == null)
				precisionInput = DBNull.Value;

			var column = new TestableColumnMetaData(null, columnSizeInput, precisionInput);

			Assert.AreEqual(expectedColumnSize, column.ColumnSize);
			Assert.AreEqual(expectedPrecision, column.NumericalPrecision);
		}