Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
// SqliteExceptionUnitTests.cs - NUnit Test Cases for Mono.Data.Sqlite.SqliteExceptions
//
// Author(s): Thomas Zoechling <thomas.zoechling@gmx.at>
using System;
using System.Data;
using System.IO;
using System.Text;
using Mono.Data.Sqlite;
using NUnit.Framework;
namespace MonoTests.Mono.Data.Sqlite
{
[TestFixture]
public class SqliteExceptionUnitTests
{
readonly static string _uri = "SqliteTest.db";
readonly static string _connectionString = "URI=file://" + _uri + ", version=3";
static SqliteConnection _conn = new SqliteConnection (_connectionString);
public SqliteExceptionUnitTests()
{
}
[Test]
#if NET_2_0
[ExpectedException(typeof(SqliteException))]
#else
[ExpectedException(typeof(SqliteSyntaxException))]
#endif
public void WrongSyntax()
{
SqliteCommand insertCmd = new SqliteCommand("INSERT INTO t1 VALUES (,')",_conn);
using(_conn)
{
_conn.Open();
int res = insertCmd.ExecuteNonQuery();
Assert.AreEqual(res,1);
}
}
}
}