Пример #1
0
        public static void ToLengthChangeableItemValueListTest()
        {
            var instance = new DBItemValueList();

            DBItemValueList result       = null;
            var             errorOccured = false;

            try
            {
                result = instance.ToLengthChangeableItemValueList();
            }
            catch (Exception ex)
            {
                logger.Exception(ex);
                errorOccured = true;
            }

            // エラーが発生しないこと
            Assert.IsFalse(errorOccured);

            try
            {
                result.Add((DBValueInt)10);
            }
            catch (Exception ex)
            {
                logger.Exception(ex);
                errorOccured = true;
            }

            // エラーが発生しないこと
            Assert.IsFalse(errorOccured);
        }
Пример #2
0
        private static DatabaseDataDescList CreateDataDescList(int length, int itemLength)
        {
            if (length == -1)
            {
                return(null);
            }

            var result = new List <DatabaseDataDesc>();

            for (var i = 0; i < length; i++)
            {
                var itemValueList = new DBItemValueList();
                for (var j = 0; j < itemLength; j++)
                {
                    itemValueList.Add(CreateDBValue(i, j));
                }

                result.Add(new DatabaseDataDesc(CreateDataName(i), itemValueList));
            }

            return(new DatabaseDataDescList(result));
        }