本文整理匯總了Java中org.oscm.app.iaas.intf.FWCommunication類的典型用法代碼示例。如果您正苦於以下問題:Java FWCommunication類的具體用法?Java FWCommunication怎麽用?Java FWCommunication使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
FWCommunication類屬於org.oscm.app.iaas.intf包,在下文中一共展示了FWCommunication類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setUp
import org.oscm.app.iaas.intf.FWCommunication; //導入依賴的package包/類
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
vServerProcessor = spy(new VServerProcessorBean());
vServerProcessor.vserverComm = mock(VServerCommunication.class);
vServerProcessor.vsysComm = mock(VSystemCommunication.class);
vServerProcessor.fwComm = mock(FWCommunication.class);
vServerProcessor.vdiskInfo = mock(VDiskCommunication.class);
platformService = mock(APPlatformService.class);
doReturn("RUNNING").when(vServerProcessor.fwComm).getFirewallStatus(
any(PropertyHandler.class));
doReturn(Boolean.TRUE).when(platformService).lockServiceInstance(
anyString(), anyString(), any(PasswordAuthentication.class));
doNothing().when(platformService).unlockServiceInstance(anyString(),
anyString(), any(PasswordAuthentication.class));
doNothing().when(platformService).sendMail(anyListOf(String.class),
subject.capture(), text.capture());
User user = new User();
user.setLocale("de");
doReturn(user).when(platformService).authenticate(anyString(),
any(PasswordAuthentication.class));
vServerProcessor.setPlatformService(platformService);
parameters = new HashMap<>();
configSettings = new HashMap<>();
settings = new ProvisioningSettings(parameters, configSettings, "en");
settings.setSubscriptionId("subId");
paramHandler = new PropertyHandler(settings);
}