예제 #1
0
        public void LoadAndDataFileTest()
        {
            #region --Arrange --
            #endregion

            #region --Act --
            var dataTable = _workService.LoadAndDataFile(_path);
            Trace.WriteLine(string.Format("Columns in the Table: {0}", dataTable.Columns.Count));
            #endregion

            #region --Assert --
            Assert.AreEqual(dataTable.Columns.Count, 10);
            #endregion
        }
예제 #2
0
        public void BulkSqlInsertTest()
        {
            #region --Arrange --

            var result = false;
            #endregion

            #region --Act --
            var dataTable = _workService.LoadAndDataFile(_path);
            try
            {
                _workRepository.BulkInsert(dataTable);
                Trace.WriteLine(string.Format("Successfully Uploaded: {0}", dataTable.Rows.Count));
                result = true;
            }
            catch (Exception exception)
            {
                Trace.WriteLine(exception.Message);
            }
            #endregion

            #region --Assert --
            Assert.IsTrue(result);
            #endregion
        }