ref #9327 adapt vaadin to new secundum handling
[cdm-vaadin.git] / src / test / java / eu / etaxonomy / cdm / vaadin / container / CdmSQLContainerTest.java
1 /**
2 * Copyright (C) 2017 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9 package eu.etaxonomy.cdm.vaadin.container;
10
11 import java.sql.SQLException;
12 import java.util.Collection;
13
14 import org.apache.log4j.Logger;
15 import org.junit.Assert;
16 import org.junit.Test;
17 import org.unitils.dbunit.annotation.DataSet;
18
19 import eu.etaxonomy.cdm.test.unitils.CleanSweepInsertLoadStrategy;
20 import eu.etaxonomy.cdm.vaadin.CdmVaadinBaseTest;
21
22 @DataSet(loadStrategy=CleanSweepInsertLoadStrategy.class, value="CdmSQLContainerTest.xml")
23 public class CdmSQLContainerTest extends CdmVaadinBaseTest {
24
25 @SuppressWarnings("unused")
26 private static final Logger logger = Logger.getLogger(CdmSQLContainerTest.class);
27
28 @Test
29 @DataSet(loadStrategy=CleanSweepInsertLoadStrategy.class, value="CdmSQLContainerTest.xml")
30 public void testTaxonContainer() throws SQLException {
31
32 CdmSQLContainer csc = CdmSQLContainer.newInstance("TaxonBase");
33 Collection<?> propIds = csc.getContainerPropertyIds();
34 Collection<?> itemIds = csc.getItemIds();
35 Assert.assertEquals(5, itemIds.size());
36 }
37
38
39
40 }