20 using NUnit.Framework;
22 namespace Deveel.Data.Sql.Triggers {
28 var query = base.CreateQuery(session);
30 var tableInfo =
new TableInfo(TestTableName);
35 query.CreateTable(tableInfo);
44 var system = base.CreateSystem();
45 system.
Context.ListenTriggers(trigger => {
49 beforeEvent = trigger;
56 protected override void OnSetUp(
string testName) {
57 if (!testName.EndsWith(
"_NoTriggers")) {
61 base.OnSetUp(testName);
66 var table =
Query.GetMutableTable(TestTableName);
68 Assert.IsNotNull(table);
70 var row = table.NewRow();
72 row.SetValue(1,
"Antonello");
73 row.SetValue(2,
"Provenzano");
75 Assert.DoesNotThrow(() => table.AddRow(row));
76 Assert.DoesNotThrow(() =>
Query.Commit());
78 Assert.IsNull(beforeEvent);
79 Assert.IsNull(afterEvent);
Provides some helper functions for resolving and creating SqlType instances that are primitive to the...
static ObjectName Parse(string s)
Parses the given string into a ObjectName object.
new ISystemContext Context
TriggerEventType
The different types of high layer trigger events.
static NumericType Integer()
Describes the name of an object within a database.
An isolated session to a given database for a given user, encapsulating the transaction for operation...
static StringType String()
override ISystem CreateSystem()
override IQuery CreateQuery(ISession session)
override void OnSetUp(string testName)
Defines the metadata properties of a table existing within a database.