use of ddf.catalog.data.QualifiedMetacardType in project ddf by codice.
the class MetacardTypeRegistryTest method testLookupMetacardTypeCantFindName.
@Test
public void testLookupMetacardTypeCantFindName() {
QualifiedMetacardType qmt = mtr.lookup(QUALIFIED_METACARD_TYPE_NAMESPACE_1, QUALIFIED_METACARD_TYPE_NAME_BAD);
assertNull(qmt);
}
use of ddf.catalog.data.QualifiedMetacardType in project ddf by codice.
the class MetacardTypeRegistryTest method testLookupMetacardTypeEmptyNamespace.
@Test
public void testLookupMetacardTypeEmptyNamespace() {
QualifiedMetacardType qmtResult = mtr.lookup("", QUALIFIED_METACARD_TYPE_NAME_3);
assertNotNull(qmtResult);
assertEquals(QUALIFIED_METACARD_TYPE_NAME_3, qmtResult.getName());
assertEquals("", qmtResult.getNamespace());
assertOnExpectedMetacardTypeFields(qmtResult);
}
use of ddf.catalog.data.QualifiedMetacardType in project ddf by codice.
the class MetacardTypeRegistryTest method registerMetacardTypeEmptyNamepsace.
@Test
public void registerMetacardTypeEmptyNamepsace() throws IllegalArgumentException, MetacardTypeUnregistrationException {
QualifiedMetacardType qmt = new QualifiedMetacardTypeImpl("", 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 testNoNamespaceLookup.
@Test
public void testNoNamespaceLookup() {
QualifiedMetacardType qmt = mtr.lookup(QUALIFIED_METACARD_TYPE_NAME_3);
assertNotNull(qmt);
assertEquals(QUALIFIED_METACARD_TYPE_NAME_3, qmt.getName());
assertEquals(QualifiedMetacardType.DEFAULT_METACARD_TYPE_NAMESPACE, qmt.getNamespace());
assertOnExpectedMetacardTypeFields(qmt);
}
use of ddf.catalog.data.QualifiedMetacardType in project ddf by codice.
the class MetacardTypeRegistryTest method testRegisteredTypes.
@Test
public void testRegisteredTypes() {
Set<QualifiedMetacardType> registeredTypes = mtr.getRegisteredTypes();
assertEquals(4, registeredTypes.size());
QualifiedMetacardTypeImpl test0 = new QualifiedMetacardTypeImpl(QUALIFIED_METACARD_TYPE_NAMESPACE_1, QUALIFIED_METACARD_TYPE_NAME_1, qmtAttributes);
assertTrue(registeredTypes.contains(test0));
QualifiedMetacardTypeImpl test1 = new QualifiedMetacardTypeImpl(QUALIFIED_METACARD_TYPE_NAMESPACE_1, QUALIFIED_METACARD_TYPE_NAME_2, qmtAttributes);
assertTrue(registeredTypes.contains(test1));
QualifiedMetacardTypeImpl test2 = new QualifiedMetacardTypeImpl(QualifiedMetacardType.DEFAULT_METACARD_TYPE_NAMESPACE, QUALIFIED_METACARD_TYPE_NAME_3, qmtAttributes);
assertTrue(registeredTypes.contains(test2));
}
Aggregations