package com.splicemachine.derby.impl.sql.execute.actions;

public class ConstraintConstantOperationTest {

}

@@ -56,54 +56,1768 @@
 s;%0A%0A
-public class ConstraintConstantOperationTest %7B
+import com.splicemachine.derby.test.framework.SpliceSchemaWatcher;%0Aimport com.splicemachine.derby.test.framework.SpliceTableWatcher;%0Aimport com.splicemachine.derby.test.framework.SpliceUnitTest;%0Aimport com.splicemachine.derby.test.framework.SpliceWatcher;%0Aimport org.junit.ClassRule;%0Aimport org.junit.Ignore;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.RuleChain;%0Aimport org.junit.rules.TestRule;%0A%0Apublic class ConstraintConstantOperationTest extends SpliceUnitTest %7B%0A%0A    protected static SpliceWatcher spliceClassWatcher = new SpliceWatcher();%0A    protected static SpliceSchemaWatcher spliceSchemaWatcher =%0A            new SpliceSchemaWatcher(ConstraintConstantOperationTest.class.getSimpleName());%0A    protected static SpliceTableWatcher spliceTableWatcher =%0A            new SpliceTableWatcher(%22Tasks%22,ConstraintConstantOperationTest.class.getSimpleName(),%0A    %22(TaskId INT, StartedAt INT, FinishedAt INT, CONSTRAINT CHK_StartedAt_Before_FinishedAt CHECK ( StartedAt %3C FinishedAt ))%22);%0A%0A    @ClassRule%0A    public static TestRule chain = RuleChain.outerRule(spliceClassWatcher)%0A            .around(spliceSchemaWatcher)%0A            .around(spliceTableWatcher);%0A%0A    @Rule%0A    public SpliceWatcher methodWatcher = new SpliceWatcher();%0A%0A    @Test%0A    @Ignore(%22Bug 535%22)%0A    public void testInsertGoodRow() throws Exception%7B%0A        methodWatcher.getStatement().execute(%22insert into%22+this.getPaddedTableReference(%22Tasks%22)+%22(TaskId, StartedAt, FinishedAt) values (1234,0500,0600)%22);%0A    %7D%0A%0A    @Test%0A    @Ignore(%22Bug 535%22)%0A    public void testInsertBadRow() throws Exception%7B%0A        methodWatcher.getStatement().execute(%22insert into%22+this.getPaddedTableReference(%22Tasks%22)+%22(TaskId, StartedAt, FinishedAt) values (1235,0601,0600)%22);%0A    %7D
 %0A%0A%7D%0A

Test for bug 535 - Derby ClassCastException when insert values into table with constraint.