use of org.apache.qpid.server.management.plugin.controller.CategoryController in project qpid-broker-j by apache.
the class LegacyCategoryControllerFactoryTest method createController.
@Test
public void createController() {
LegacyCategoryControllerFactory.SUPPORTED_CATEGORIES.forEach(category -> {
final CategoryController controller = _factory.createController(category, _nextVersionManagementController);
assertThat(controller.getCategory(), is(equalTo(category)));
});
}
use of org.apache.qpid.server.management.plugin.controller.CategoryController in project qpid-broker-j by apache.
the class ContainerControllerTest method convertNextVersionBrokerConfiguredObject.
@Test
public void convertNextVersionBrokerConfiguredObject() {
final CategoryController controller = _factory.createController("Broker", _nextVersionManagementController);
assertThat(controller.getCategory(), is(equalTo("Broker")));
final LegacyConfiguredObject object = mock(LegacyConfiguredObject.class);
when(object.getAttribute("modelVersion")).thenReturn("foo");
final LegacyConfiguredObject converted = controller.convertFromNextVersion(object);
Object modelVersion = converted.getAttribute("modelVersion");
assertThat(modelVersion, is(equalTo(MODEL_VERSION)));
}
use of org.apache.qpid.server.management.plugin.controller.CategoryController in project qpid-broker-j by apache.
the class ContainerControllerTest method convertNextVersionVirtualHostConfiguredObject.
@Test
public void convertNextVersionVirtualHostConfiguredObject() {
final CategoryController controller = _factory.createController("VirtualHost", _nextVersionManagementController);
assertThat(controller.getCategory(), is(equalTo("VirtualHost")));
final LegacyConfiguredObject object = mock(LegacyConfiguredObject.class);
when(object.getAttribute("modelVersion")).thenReturn("foo");
final LegacyConfiguredObject converted = controller.convertFromNextVersion(object);
Object modelVersion = converted.getAttribute("modelVersion");
assertThat(modelVersion, is(equalTo(MODEL_VERSION)));
}
use of org.apache.qpid.server.management.plugin.controller.CategoryController in project qpid-broker-j by apache.
the class LegacyCategoryControllerFactoryTest method createController.
@Test
public void createController() {
SUPPORTED_CATEGORIES.keySet().forEach(category -> {
final CategoryController controller = _factory.createController(category, _nextVersionManagementController);
assertThat(controller.getCategory(), is(equalTo(category)));
});
}
Aggregations