コード例 #1
0
ファイル: TestSomeInserts.cs プロジェクト: DNCarroll/Weapons
 public void ForceASqlMissingParameterError()
 {
     var connString = "Data Source=CEARVALL;Initial Catalog=boosttraining;Integrated Security=True";
     var commandText = "AAAAADeleteWhenDoneTesting";
     var command = commandText.GetCommand(connString);
     //System.Threading.Thread.Sleep(30000);
     var testObject = new TestObjectForDatabase { FirstName = "Nathan", LastName = "Carroll", ID = 1 };
     try
     {
         testObject.Execute(command);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
コード例 #2
0
        public void ForceASqlMissingParameterError()
        {
            var connString  = "Data Source=CEARVALL;Initial Catalog=boosttraining;Integrated Security=True";
            var commandText = "AAAAADeleteWhenDoneTesting";

            var testObject = new TestObjectForDatabase {
                FirstName = "Nathan", LastName = "Carroll", ID = 1
            };

            try
            {
                testObject.Execute(new ProcedureDefinition(commandText, connString));
            }
            catch (Exception ex)
            {
                throw;
            }
        }
コード例 #3
0
ファイル: TestSomeInserts.cs プロジェクト: DNCarroll/Weapons
        public void ForceTimeoutOnCache()
        {
            var connString = "Data Source=CEARVALL;Initial Catalog=boosttraining;Integrated Security=True";
            var commandText = "AAAAADeleteWhenDoneTesting";
            //System.Threading.Thread.Sleep(30000);
            BattleAxe.CommandMethods.SqlCommandCacheTimeout = SqlCommandCacheTimeout.FifteenMinutes;
            var command = commandText.GetCommand(connString);

            var testObject = new TestObjectForDatabase { FirstName = "Nathan", LastName = "Carroll", ID = 1 };
            try
            {
                System.Threading.Thread.Sleep(new TimeSpan(0, 15, 20));
                command = commandText.GetCommand(connString);
            }
            catch (Exception ex)
            {
                throw;
            }
        }