Search in sources :

Example 21 with Column

use of org.obeonetwork.dsl.database.Column in project InformationSystem by ObeoNetwork.

the class ColumnServicesTest method isAutoIncrementNonTest.

// @Test
// public void isAutoIncrementTest() {
// Table table = getGSSerieTable();
// Column col = getColumn(table, "RF_GENRE_ID");
// assertEquals("Oui", new ColumnServices().isForeignKey(col));
// }
@Test
public void isAutoIncrementNonTest() {
    Table table = getGSSerieTable();
    Column col = getColumn(table, "GS_SERIE_NOM");
    assertEquals("Non", new ColumnServices().isInForeignKey(col));
}
Also used : Table(org.obeonetwork.dsl.database.Table) Column(org.obeonetwork.dsl.database.Column) Test(org.junit.Test) AbstractTest(org.obeonetwork.database.m2doc.services.common.AbstractTest)

Example 22 with Column

use of org.obeonetwork.dsl.database.Column in project InformationSystem by ObeoNetwork.

the class ColumnServicesTest method isUniqueNullTest.

@Test
public void isUniqueNullTest() {
    Table table = getGSSerieTable();
    Column col = getColumn(table, "No table");
    assertEquals("No", new ColumnServices().isUnic(col));
}
Also used : Table(org.obeonetwork.dsl.database.Table) Column(org.obeonetwork.dsl.database.Column) Test(org.junit.Test) AbstractTest(org.obeonetwork.database.m2doc.services.common.AbstractTest)

Example 23 with Column

use of org.obeonetwork.dsl.database.Column in project InformationSystem by ObeoNetwork.

the class ColumnServicesTest method isUniqueOuiTest.

@Test
public void isUniqueOuiTest() {
    Table table = getGSSerieTable();
    Column col = getColumn(table, "GS_SERIE_NOM");
    assertEquals("Oui", new ColumnServices().isUnic(col));
}
Also used : Table(org.obeonetwork.dsl.database.Table) Column(org.obeonetwork.dsl.database.Column) Test(org.junit.Test) AbstractTest(org.obeonetwork.database.m2doc.services.common.AbstractTest)

Example 24 with Column

use of org.obeonetwork.dsl.database.Column in project InformationSystem by ObeoNetwork.

the class ColumnServicesTest method checkUniqueNullTest.

@Test
public void checkUniqueNullTest() {
    Table table = getGSSerieTable();
    Column col = getColumn(table, "No table");
    assertEquals("", new ColumnServices().checkUnique(col));
}
Also used : Table(org.obeonetwork.dsl.database.Table) Column(org.obeonetwork.dsl.database.Column) Test(org.junit.Test) AbstractTest(org.obeonetwork.database.m2doc.services.common.AbstractTest)

Example 25 with Column

use of org.obeonetwork.dsl.database.Column in project InformationSystem by ObeoNetwork.

the class ColumnServicesTest method isUniqueNonTest.

@Test
public void isUniqueNonTest() {
    Table table = getGSSerieTable();
    Column col = getColumn(table, "GS_SERIE_ID");
    assertEquals("Non", new ColumnServices().isUnic(col));
}
Also used : Table(org.obeonetwork.dsl.database.Table) Column(org.obeonetwork.dsl.database.Column) Test(org.junit.Test) AbstractTest(org.obeonetwork.database.m2doc.services.common.AbstractTest)

Aggregations

Column (org.obeonetwork.dsl.database.Column)83 Table (org.obeonetwork.dsl.database.Table)41 Test (org.junit.Test)31 AbstractTest (org.obeonetwork.database.m2doc.services.common.AbstractTest)31 TypeInstance (org.obeonetwork.dsl.typeslibrary.TypeInstance)11 EObject (org.eclipse.emf.ecore.EObject)9 AbstractTable (org.obeonetwork.dsl.database.AbstractTable)8 ForeignKey (org.obeonetwork.dsl.database.ForeignKey)7 ArrayList (java.util.ArrayList)6 Constraint (org.obeonetwork.dsl.database.Constraint)6 ForeignKeyElement (org.obeonetwork.dsl.database.ForeignKeyElement)6 Sequence (org.obeonetwork.dsl.database.Sequence)6 BigInteger (java.math.BigInteger)5 ResultSet (java.sql.ResultSet)5 SQLException (java.sql.SQLException)5 NativeType (org.obeonetwork.dsl.typeslibrary.NativeType)5 PreparedStatement (java.sql.PreparedStatement)4 Viewer (org.eclipse.jface.viewers.Viewer)4 ViewerFilter (org.eclipse.jface.viewers.ViewerFilter)4 IndexElement (org.obeonetwork.dsl.database.IndexElement)4