Created constants in API for default tenant type setup.

Signed-off-by: Kai Zimmermann <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2016-06-02 15:13:49 +02:00
parent e12fcd804e
commit 2769170c47
6 changed files with 77 additions and 25 deletions

View File

@@ -16,6 +16,7 @@ import org.eclipse.hawkbit.repository.jpa.model.JpaSoftwareModule;
import org.eclipse.hawkbit.repository.jpa.model.JpaSoftwareModuleMetadata;
import org.eclipse.hawkbit.repository.model.SoftwareModule;
import org.eclipse.hawkbit.repository.model.SoftwareModuleMetadata;
import org.eclipse.hawkbit.repository.util.TestdataFactory;
import org.junit.Before;
import org.junit.Test;
import org.springframework.data.domain.Page;
@@ -84,10 +85,10 @@ public class RSQLSoftwareModuleFieldTest extends AbstractJpaIntegrationTest {
@Test
@Description("Test filter software module by type")
public void testFilterByType() {
assertRSQLQuery(SoftwareModuleFields.TYPE.name() + "==application", 2);
assertRSQLQuery(SoftwareModuleFields.TYPE.name() + "==" + TestdataFactory.SM_TYPE_APP, 2);
assertRSQLQuery(SoftwareModuleFields.TYPE.name() + "==noExist*", 0);
assertRSQLQuery(SoftwareModuleFields.TYPE.name() + "=in=(application)", 2);
assertRSQLQuery(SoftwareModuleFields.TYPE.name() + "=out=(application)", 2);
assertRSQLQuery(SoftwareModuleFields.TYPE.name() + "=in=(" + TestdataFactory.SM_TYPE_APP + ")", 2);
assertRSQLQuery(SoftwareModuleFields.TYPE.name() + "=out=(" + TestdataFactory.SM_TYPE_APP + ")", 2);
}
@Test