use of ddf.catalog.data.QualifiedMetacardType in project ddf by codice.
the class MetacardTypeRegistryTest method registerMetacardTypeEmptyName.
@Test(expected = IllegalArgumentException.class)
public void registerMetacardTypeEmptyName() {
QualifiedMetacardType qmt = new QualifiedMetacardTypeImpl(QUALIFIED_METACARD_TYPE_NAMESPACE_1, "", qmtAttributes);
mtr.register(qmt);
}
use of ddf.catalog.data.QualifiedMetacardType in project ddf by codice.
the class MetacardTypeRegistryTest method testNoNamespaceLookupMatchingNameMismatchingNamespace.
@Test
public void testNoNamespaceLookupMatchingNameMismatchingNamespace() {
QualifiedMetacardType qmt = mtr.lookup(QUALIFIED_METACARD_TYPE_NAME_2);
assertNull(qmt);
}
use of ddf.catalog.data.QualifiedMetacardType in project ddf by codice.
the class MetacardTypeRegistryTest method testLookupMetacardType.
@Test
public void testLookupMetacardType() {
QualifiedMetacardType qmtResult = mtr.lookup("ddf.test.namespace", QUALIFIED_METACARD_TYPE_NAME_1);
assertNotNull(qmtResult);
assertEquals(QUALIFIED_METACARD_TYPE_NAME_1, qmtResult.getName());
assertEquals(QUALIFIED_METACARD_TYPE_NAMESPACE_1, qmtResult.getNamespace());
assertOnExpectedMetacardTypeFields(qmtResult);
}
use of ddf.catalog.data.QualifiedMetacardType in project ddf by codice.
the class MetacardTypeRegistryTest method registerMetacardTypeNullNamespace.
@Test
public void registerMetacardTypeNullNamespace() throws IllegalArgumentException, MetacardTypeUnregistrationException {
QualifiedMetacardType qmt = new QualifiedMetacardTypeImpl(null, QUALIFIED_METACARD_TYPE_NAME_1, qmtAttributes);
mtr.register(qmt);
QualifiedMetacardType metacardTypeFromReg = mtr.lookup(QualifiedMetacardType.DEFAULT_METACARD_TYPE_NAMESPACE, QUALIFIED_METACARD_TYPE_NAME_1);
assertNotNull(metacardTypeFromReg);
assertEquals(QualifiedMetacardType.DEFAULT_METACARD_TYPE_NAMESPACE, metacardTypeFromReg.getNamespace());
assertEquals(QUALIFIED_METACARD_TYPE_NAME_1, metacardTypeFromReg.getName());
mtr.unregister(qmt);
}
use of ddf.catalog.data.QualifiedMetacardType in project ddf by codice.
the class MetacardTypeRegistryTest method testNoNamespaceLookupCantFindName.
@Test
public void testNoNamespaceLookupCantFindName() {
QualifiedMetacardType qmt = mtr.lookup(QUALIFIED_METACARD_TYPE_NAME_BAD);
assertNull(qmt);
}
Aggregations