Search in sources :

Example 1 with RegistryException

use of org.spongepowered.api.registry.RegistryException in project SpongeCommon by SpongePowered.

the class CatalogTypeClassesTest method testCatalogCanBeRetrieved.

@Test
public void testCatalogCanBeRetrieved() throws Exception {
    assumeFalse(this.isDummy);
    final CatalogType o = (CatalogType) this.targetedField.get(null);
    this.registryModule.getById(o.getId()).orElseThrow(() -> new RegistryException("Could not locate " + this.fieldName + " in the registry: " + this.registryModule));
}
Also used : CatalogType(org.spongepowered.api.CatalogType) RegistryException(org.spongepowered.api.registry.RegistryException) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 CatalogType (org.spongepowered.api.CatalogType)1 RegistryException (org.spongepowered.api.registry.RegistryException)1