Пример #1
0
        public static void GetObjectValueTest()
        {
            StringBuilder sbCreateTableSql = new StringBuilder();

            //附属信息
            sbCreateTableSql.Append("Create table ControllerAttachedInfo2(ID integer not null primary key autoincrement,controllerID integer not null,FileVersion varchar(4), ProtocolVersion varchar(4));");
            string strDBFile = "E:\\test.db";

            //_logHelper = Substitute.For<SCA.Interface.ILogRecorder>();
            //_fileService = new SCA.BusinessLib.Utility.FileService();
            _dbConn = new SCA.DatabaseAccess.SQLiteDatabaseAccess(strDBFile, _logHelper, _fileService);
            _dbConn.ExecuteBySql(sbCreateTableSql);
            int intControllerAttachedInfoNum = Convert.ToInt16(_dbConn.GetObjectValue(new StringBuilder("select count(*) from Co9ntrollerAttachedInfo2")));

            _dbConn.Dispose();
        }
Пример #2
0
 public void Dipsose()
 {
     Console.WriteLine("TearDown");
     _dbConn.Dispose();
     _fileService.DeleteFile(strDBFile);
 }