Package org.jboss.as.controller

Examples of org.jboss.as.controller.OperationContext.createResource()


        final OperationContext context = Mockito.mock(OperationContext.class);
        Resource resource = Mockito.mock(Resource.class);
        Mockito.when(resource.getModel()).thenReturn(result);
        Mockito.when(context.getServiceRegistry(true)).thenReturn(serviceRegistry);
        Mockito.when(context.completeStep()).thenReturn(stepResult);
        Mockito.when(context.createResource(PathAddress.EMPTY_ADDRESS)).thenReturn(resource);
        Mockito.when(context.readResource(PathAddress.EMPTY_ADDRESS)).thenReturn(resource);
        Mockito.when(context.getProcessType()).thenReturn(ProcessType.STANDALONE_SERVER);
        Mockito.when(context.getRunningMode()).thenReturn(RunningMode.NORMAL);
        Mockito.when(context.isNormalServer()).thenReturn(true);
        Mockito.doAnswer(new Answer<Void>() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.