Search in sources :

Example 21 with Table

use of org.obeonetwork.dsl.database.Table 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 Table

use of org.obeonetwork.dsl.database.Table 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 Table

use of org.obeonetwork.dsl.database.Table 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 Table

use of org.obeonetwork.dsl.database.Table 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 Table

use of org.obeonetwork.dsl.database.Table 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

Table (org.obeonetwork.dsl.database.Table)86 Column (org.obeonetwork.dsl.database.Column)41 Test (org.junit.Test)31 AbstractTest (org.obeonetwork.database.m2doc.services.common.AbstractTest)31 AbstractTable (org.obeonetwork.dsl.database.AbstractTable)22 EObject (org.eclipse.emf.ecore.EObject)17 ForeignKey (org.obeonetwork.dsl.database.ForeignKey)16 ArrayList (java.util.ArrayList)11 ForeignKeyElement (org.obeonetwork.dsl.database.ForeignKeyElement)7 Index (org.obeonetwork.dsl.database.Index)7 ResultSet (java.sql.ResultSet)6 SQLException (java.sql.SQLException)6 ReferencesTableSettings (org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings)6 Viewer (org.eclipse.jface.viewers.Viewer)6 ViewerFilter (org.eclipse.jface.viewers.ViewerFilter)6 Constraint (org.obeonetwork.dsl.database.Constraint)6 Sequence (org.obeonetwork.dsl.database.Sequence)6 BigInteger (java.math.BigInteger)5 PreparedStatement (java.sql.PreparedStatement)5 EObjectPropertiesEditionContext (org.eclipse.emf.eef.runtime.context.impl.EObjectPropertiesEditionContext)5