Search in sources :

Example 1 with StoreCapabilityType

use of voldemort.store.StoreCapabilityType in project voldemort by voldemort.

the class ViewStorageEngineTest method testGetCapabilityThrowsNoSuchCapabilityException.

public void testGetCapabilityThrowsNoSuchCapabilityException() {
    Set<StoreCapabilityType> supportedCapabilities = EnumSet.of(StoreCapabilityType.VIEW_TARGET);
    for (StoreCapabilityType capabilityType : StoreCapabilityType.values()) {
        if (supportedCapabilities.contains(capabilityType)) {
            assertNotNull("unexpected null value returned for StoreCapabilityType." + capabilityType, view.getCapability(capabilityType));
        } else {
            try {
                view.getCapability(StoreCapabilityType.DISABLE_STORE_VERSION);
                fail("Expected NoSuchCapabilityException to be thrown for StoreCapabilityType." + capabilityType);
            } catch (NoSuchCapabilityException e) {
            // expected
            }
        }
    }
}
Also used : StoreCapabilityType(voldemort.store.StoreCapabilityType) NoSuchCapabilityException(voldemort.store.NoSuchCapabilityException)

Aggregations

NoSuchCapabilityException (voldemort.store.NoSuchCapabilityException)1 StoreCapabilityType (voldemort.store.StoreCapabilityType)1