• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java CreateServiceInstanceBindingRequest类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest的典型用法代码示例。如果您正苦于以下问题:Java CreateServiceInstanceBindingRequest类的具体用法?Java CreateServiceInstanceBindingRequest怎么用?Java CreateServiceInstanceBindingRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CreateServiceInstanceBindingRequest类属于org.cloudfoundry.community.servicebroker.model包,在下文中一共展示了CreateServiceInstanceBindingRequest类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testCreateInstanceBindingPlanShared_success_shouldReturnBinding

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Test
public void testCreateInstanceBindingPlanShared_success_shouldReturnBinding() throws Exception {
  String instanceId = UUID.randomUUID().toString();
  CreateServiceInstanceRequest request = getCreateInstanceRequest(instanceId,
                                                                  "shared-plan");
  instanceService.createServiceInstance(request);
  CreateServiceInstanceBindingRequest bindingRequest =
      new CreateServiceInstanceBindingRequest(getServiceInstance(instanceId)
                                                  .getServiceDefinitionId(),
                                              "FAKE-BASE_GUID-shared-plan",
                                              "appGuid").withBindingId("bindingId")
          .withServiceInstanceId(instanceId);
  ServiceInstanceBinding binding = instanceBindingService.createServiceInstanceBinding(
      bindingRequest);
  assertThat(binding.getServiceInstanceId(), equalTo(instanceId));
}
 
开发者ID:trustedanalytics,项目名称:hive-broker,代码行数:17,代码来源:HiveBrokerIntegrationTest.java


示例2: init

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Before
public void init() throws DatabaseExtractionException {
    initMocks(this);
    databaseRef = new DatabaseRef("mydb", URI.create(DATABASE_URI));
    databaseRef.setType(DATABASE_TYPE);
    dbDumperServiceInstance.setDatabaseRef(databaseRef);
    parameters = Maps.newHashMap();
    createRequest = new CreateServiceInstanceBindingRequest(serviceDefinitionId, planId, appGuid, parameters)
            .withBindingId(bindingId)
            .withServiceInstanceId(serviceId);
    this.dbDumperCredential1 = this.forgeDbDumperCredential(1, false);
    this.dbDumperCredential2 = this.forgeDbDumperCredential(2, false);
    this.dbDumperCredential3 = this.forgeDbDumperCredential(3, true);
    dbDumperCredentials = Arrays.asList(dbDumperCredential1, dbDumperCredential2, dbDumperCredential3);
    instanceBindingService.dateFormat = this.dateFormat;

    when(repositoryInstance.findOne(anyString())).thenReturn(dbDumperServiceInstance);
    when(credentials.getDumpsCredentials((DbDumperServiceInstance) notNull())).thenReturn(dbDumperCredentials);
}
 
开发者ID:orange-cloudfoundry,项目名称:db-dumper-service,代码行数:20,代码来源:DbDumperServiceInstanceBindingServiceTest.java


示例3: createServiceInstanceBinding

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Override
public ServiceInstanceBinding createServiceInstanceBinding(
        CreateServiceInstanceBindingRequest request)
        throws ServiceInstanceBindingExistsException,
        ServiceBrokerException {

    String bindingId = request.getBindingId(); // user
    String instanceId = request.getServiceInstanceId(); // workspace

    log.info(String.format("attempting to provision an FTP for workspace " +
            "(serviceInstanceId) %s and user (bindingId) %s", instanceId, bindingId));

    FtpServerProvisionerRequest r = new FtpServerProvisionerRequest(bindingId, instanceId);

    String response = this.client.provisionFtpServer(r);

    log.info(String.format("received FTP service provision response %s", response));

    PersistableServiceInstanceBinding psb = new PersistableServiceInstanceBinding(
            request.getBindingId(),
            request.getServiceInstanceId(),
            response,
            null, request.getAppGuid());

    return this.bindingRepository.save(psb);
}
 
开发者ID:joshlong,项目名称:cloudfoundry-ftp-service-broker,代码行数:27,代码来源:FtpServiceInstanceBindingService.java


示例4: itShouldNotBindToTheSameAppTwice

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Test(expected = ServiceInstanceBindingExistsException.class)
public void itShouldNotBindToTheSameAppTwice()
		throws ServiceInstanceBindingExistsException,
		ServiceBrokerException {

	ArrayList<ServiceInstanceBinding> list = new ArrayList<ServiceInstanceBinding>();
	list.add(new ServiceInstanceBinding("foo", serviceInstance
			.getServiceInstanceId(), null, null, "test_app"));
	when(bindingManager.getBindings()).thenReturn(list);

	bindResult = bindingService
			.createServiceInstanceBinding(createServiceInstanceBindingRequest);
	createServiceInstanceBindingRequest = new CreateServiceInstanceBindingRequest(
			"postgrescdm", COPY, "test_app")
			.withBindingId(bindingId + "foo").and()
			.withServiceInstanceId(serviceInstance.getServiceInstanceId());
	bindResult = bindingService
			.createServiceInstanceBinding(createServiceInstanceBindingRequest);
}
 
开发者ID:krujos,项目名称:data-lifecycle-service-broker,代码行数:20,代码来源:LCServiceInstanceBindingServiceCopyTest.java


示例5: itShouldReturnTheProdCreds

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Test
public void itShouldReturnTheProdCreds() throws ServiceBrokerException,
		ServiceInstanceBindingExistsException {

	Map<String, Object> testCreds = new HashMap<String, Object>();
	testCreds.put("uri", "prod_uri");
	when(provider.getCreds("source_instance")).thenReturn(testCreds);

	ServiceInstanceBinding bindResult = bindingService
			.createServiceInstanceBinding(new CreateServiceInstanceBindingRequest(
					serviceInstance.getServiceDefinitionId(), PRODUCTION,
					"test_app")
					.withBindingId(bindingId)
					.and()
					.withServiceInstanceId(
							serviceInstance.getServiceInstanceId()));
	assertThat(bindResult.getId(), is(equalTo(bindingId)));
}
 
开发者ID:krujos,项目名称:data-lifecycle-service-broker,代码行数:19,代码来源:LCServiceInstanceBindingServiceProdTest.java


示例6: createServiceInstanceBinding

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Override
public ServiceInstanceBinding createServiceInstanceBinding(CreateServiceInstanceBindingRequest request)
        throws ServiceInstanceBindingExistsException, ServiceBrokerException {

    LOGGER.debug(LoggerHelper.getParamsAsString("createServiceInstanceBinding", request.getBindingId(),
            request.getServiceInstanceId(), request.getPlanId(), request.getAppGuid()));
    try {
        Location storingLocation = Location.newInstance(request.getBindingId(),
            request.getServiceInstanceId());

        Optional<CreateServiceInstanceBindingRequest> binding = store.getById(storingLocation);
        if (binding.isPresent()) {
            throw new ServiceInstanceBindingExistsException(getServiceInstanceBinding(binding.get()));
        }

        store.save(storingLocation, request);
    } catch (IOException e) {
        throw new ServiceBrokerException(e.getMessage(), e);
    }

    return getServiceInstanceBinding(request);
}
 
开发者ID:trustedanalytics,项目名称:broker-store,代码行数:23,代码来源:ServiceInstanceBindingServiceStore.java


示例7: createServiceInstanceBinding

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Override
public ServiceInstanceBinding createServiceInstanceBinding(CreateServiceInstanceBindingRequest createServiceInstanceBindingRequest)
        throws ServiceInstanceBindingExistsException, ServiceBrokerException {
    String bindingId = createServiceInstanceBindingRequest.getBindingId();
    String serviceInstanceId = createServiceInstanceBindingRequest.getServiceInstanceId();
    String appGuid = createServiceInstanceBindingRequest.getAppGuid();
    String passwd = "";

    try {
        passwd = this.role.bindRoleToDatabase(serviceInstanceId);
    } catch (SQLException e) {
        logger.error("Error while creating service instance binding '" + bindingId + "'", e);
        throw new ServiceBrokerException(e.getMessage());
    }

    String dbURL = String.format("postgres://%s:%[email protected]%s:%d/%s", serviceInstanceId, passwd, PostgreSQLDatabase.getDatabaseHost(), PostgreSQLDatabase.getDatabasePort(), serviceInstanceId);

    Map<String, Object> credentials = new HashMap<String, Object>();
    credentials.put("uri", dbURL);

    return new ServiceInstanceBinding(bindingId, serviceInstanceId, credentials, null, appGuid);
}
 
开发者ID:cloudfoundry-community,项目名称:postgresql-cf-service-broker,代码行数:23,代码来源:PostgreSQLServiceInstanceBindingService.java


示例8: testCreateInstanceAndBinding_success_shouldReturnCredentialsMap

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Test
public void testCreateInstanceAndBinding_success_shouldReturnCredentialsMap() throws Exception {
  // arrange
  final String INSTANCE_ID = "instanceId2";
  final String BINDING_ID = "bindingId2";
  when(h2oProvisionerRestApi.createH2oInstance(INSTANCE_ID, conf.getH2oMapperNodes(),
      conf.getH2oMapperMemory(), true, yarnConfig))
          .thenReturn(new ResponseEntity<>(CREDENTIALS, HttpStatus.OK));
  instanceService
      .createServiceInstance(CfBrokerRequestsFactory.getCreateInstanceRequest(INSTANCE_ID));
  freeze().until(() -> credentialsStore.getById(Location.newInstance(INSTANCE_ID)).isPresent());

  // act
  CreateServiceInstanceBindingRequest request =
      CfBrokerRequestsFactory.getCreateServiceBindingRequest(INSTANCE_ID, BINDING_ID);
  ServiceInstanceBinding createdBinding = bindingService.createServiceInstanceBinding(request);

  // assert
  Map<String, Object> credentials = createdBinding.getCredentials();
  assertThat(createdBinding.getServiceInstanceId(), equalTo(INSTANCE_ID));
  assertThat(credentials.get("hostname"), equalTo("http://h2o.com"));
  assertThat(credentials.get("port"), equalTo("54321"));
  assertThat(credentials.get("username"), equalTo("user"));
  assertThat(credentials.get("password"), equalTo("pass"));
}
 
开发者ID:trustedanalytics,项目名称:h2o-broker,代码行数:26,代码来源:H2oBrokerIntegrationTest.java


示例9: createServiceInstanceBinding_credentialsInStore_bindingCreated

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Test
public void createServiceInstanceBinding_credentialsInStore_bindingCreated() throws Exception {
  // arrange
  CreateServiceInstanceBindingRequest request =
      CfBrokerRequestsFactory.getCreateServiceBindingRequest(INSTANCE_ID, BINDING_ID);
  when(delegateMock.createServiceInstanceBinding(request))
      .thenReturn(new ServiceInstanceBinding(BINDING_ID, INSTANCE_ID, null, SYSLOG, APP_GUID));

  H2oCredentials expectedCredentials = new H2oCredentials("a", "b", "c", "d");
  when(credentialsStoreMock.getById(Location.newInstance(INSTANCE_ID)))
      .thenReturn(Optional.of(expectedCredentials));

  // act
  ServiceInstanceBinding createdBinding = bindingService.createServiceInstanceBinding(request);

  // assert
  assertThat(createdBinding.getId(), equalTo(BINDING_ID));
  assertThat(createdBinding.getServiceInstanceId(), equalTo(INSTANCE_ID));
  assertThat(createdBinding.getSyslogDrainUrl(), equalTo(SYSLOG));
  assertThat(createdBinding.getAppGuid(), equalTo(APP_GUID));
  assertThat(createdBinding.getCredentials(), equalTo(expectedCredentials.toMap()));
}
 
开发者ID:trustedanalytics,项目名称:h2o-broker,代码行数:23,代码来源:H2oServiceInstanceBindingServiceTest.java


示例10: createServiceInstanceBinding_credentialsNotExistInStore_exceptionThrown

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Test
public void createServiceInstanceBinding_credentialsNotExistInStore_exceptionThrown()
    throws Exception {

  // arrange
  expectedException.expect(ServiceBrokerException.class);
  expectedException.expectMessage(
      "There are no stored credentials for service instance '" + INSTANCE_ID + "'");

  CreateServiceInstanceBindingRequest request =
      CfBrokerRequestsFactory.getCreateServiceBindingRequest(INSTANCE_ID, BINDING_ID);
  when(delegateMock.createServiceInstanceBinding(request))
      .thenReturn(new ServiceInstanceBinding(BINDING_ID, INSTANCE_ID, null, SYSLOG, APP_GUID));

  when(credentialsStoreMock.getById(Location.newInstance(INSTANCE_ID)))
      .thenReturn(Optional.ofNullable(null));

  // act
  bindingService.createServiceInstanceBinding(request);
}
 
开发者ID:trustedanalytics,项目名称:h2o-broker,代码行数:21,代码来源:H2oServiceInstanceBindingServiceTest.java


示例11: createServiceInstanceBinding_credentialsStoreError_exceptionThrown

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Test
public void createServiceInstanceBinding_credentialsStoreError_exceptionThrown()
    throws Exception {

  // arrange
  expectedException.expect(ServiceBrokerException.class);
  expectedException.expectMessage("Error while reading from store.");

  CreateServiceInstanceBindingRequest request =
      CfBrokerRequestsFactory.getCreateServiceBindingRequest(INSTANCE_ID, BINDING_ID);
  when(delegateMock.createServiceInstanceBinding(request))
      .thenReturn(new ServiceInstanceBinding(BINDING_ID, INSTANCE_ID, null, SYSLOG, APP_GUID));

  when(credentialsStoreMock.getById(Location.newInstance(INSTANCE_ID)))
      .thenThrow(new IOException("Error while reading from store."));

  // act
  bindingService.createServiceInstanceBinding(request);
}
 
开发者ID:trustedanalytics,项目名称:h2o-broker,代码行数:20,代码来源:H2oServiceInstanceBindingServiceTest.java


示例12: createBindingPlanShared_validRequest_credentialsReturnedBindingSavedOnFileSystem

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Test
public void createBindingPlanShared_validRequest_credentialsReturnedBindingSavedOnFileSystem() throws Exception {

  String serviceInstanceId = UUID.randomUUID().toString();
  String bindingId = UUID.randomUUID().toString();
  ServiceInstance instance = getServiceInstance(serviceInstanceId, "fakeBaseGuid-shared-plan");

  CreateServiceInstanceRequest request = getCreateInstanceRequest(instance);
  serviceBean.createServiceInstance(request);

  //arrange
  CreateServiceInstanceBindingRequest bindReq =
      getCreateBindingRequest(serviceInstanceId, instance.getPlanId()).withBindingId(bindingId);

  //act
  ServiceInstanceBinding serviceInstanceBinding = bindingBean.createServiceInstanceBinding(bindReq);
  String userDirUri = (String) serviceInstanceBinding.getCredentials().get("uri");

  //assert
  assertThat(userDirUri, endsWith(getUserDirectoryPath(serviceInstanceId, instance.getOrganizationGuid())));
  CreateServiceInstanceBindingRequest savedRequest = getSavedBindReqFromZooKeeper(serviceInstanceId, bindingId);
  assertThat(savedRequest, equalTo(bindReq));
}
 
开发者ID:trustedanalytics,项目名称:hdfs-broker,代码行数:24,代码来源:CreateTest.java


示例13: deleteBindingPlanShared_bindingCreated_bindingDeletedFromFileSystem

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Test(expected = IOException.class)
public void deleteBindingPlanShared_bindingCreated_bindingDeletedFromFileSystem() throws Exception {
  //arrange
  String bindingId = UUID.randomUUID().toString();
  String serviceInstanceId = UUID.randomUUID().toString();
  ServiceInstance instance = getServiceInstance(serviceInstanceId, "fakeBaseGuid-shared-plan");
  serviceBean.createServiceInstance(getCreateInstanceRequest(instance));

  CreateServiceInstanceBindingRequest bindReq = getCreateBindingRequest(serviceInstanceId).withBindingId(bindingId);
  bindingBean.createServiceInstanceBinding(bindReq);

  //act
  DeleteServiceInstanceBindingRequest deleteRequest = getDeleteBindingRequest(serviceInstanceId, bindReq);
  bindingBean.deleteServiceInstanceBinding(deleteRequest);

  //assert
  zkClient.getZNode(serviceInstanceId + "/" + bindingId);
}
 
开发者ID:trustedanalytics,项目名称:hdfs-broker,代码行数:19,代码来源:CreateDeleteThenGetTest.java


示例14: testCreateInstanceBinding_success_shouldReturnZookeeperNodeInCredentials

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Test
public void testCreateInstanceBinding_success_shouldReturnZookeeperNodeInCredentials()
    throws Exception {
  //arrange
  String bindingId = UUID.randomUUID().toString();
  String serviceInstanceId = UUID.randomUUID().toString();
  ServiceInstance instance = getServiceInstance(serviceInstanceId, "fakeBaseGuid-shared-plan");
  CreateServiceInstanceRequest instanceReq = getCreateInstanceRequest(instance);
  CreateServiceInstanceBindingRequest bindReq = getCreateBindingRequest(serviceInstanceId).withBindingId(bindingId);

  //act
  serviceBean.createServiceInstance(getCreateInstanceRequest(instance));
  ServiceInstanceBinding binding = bindingBean.createServiceInstanceBinding(bindReq);
  String namespaceInCredentials = (String) binding.getCredentials().get("zk.node");

  //assert
  assertThat(namespaceInCredentials, equalTo(conf.getBrokerRootNode() + "/" + serviceInstanceId));
}
 
开发者ID:trustedanalytics,项目名称:zookeeper-broker,代码行数:19,代码来源:ZookeeperBrokerIntegrationTest.java


示例15: testCreateInstanceBinding_success_shouldReturnBinding

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Test
public void testCreateInstanceBinding_success_shouldReturnBinding() throws Exception {
  CreateServiceInstanceRequest request = getCreateInstanceRequest("instanceId4",
                                                                  "multitenant-plan");
  instanceService.createServiceInstance(request);
  CreateServiceInstanceBindingRequest bindingRequest =
      new CreateServiceInstanceBindingRequest(
          getServiceInstance("instanceId4").getServiceDefinitionId(),
          "FAKE-BASE_GUID-multitenant-plan",
          "appGuid")
          .withBindingId("bindingId").withServiceInstanceId("instanceId4");
  ServiceInstanceBinding binding =
      instanceBindingService.createServiceInstanceBinding(bindingRequest);
  assertThat(binding.getServiceInstanceId(), equalTo("instanceId4"));
}
 
开发者ID:trustedanalytics,项目名称:hive-broker,代码行数:16,代码来源:HiveBrokerIntegrationTest.java


示例16: createServiceInstanceBinding

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Override
public ServiceInstanceBinding createServiceInstanceBinding(
		CreateServiceInstanceBindingRequest request)
		throws ServiceInstanceBindingExistsException,
		ServiceBrokerException {

	String bindingId = request.getBindingId();
	String appGuid = request.getAppGuid();
	log(bindingId, "Creating service binding for app " + appGuid,
			IN_PROGRESS);

	throwIfDuplicateBinding(bindingId);
	throwIfCopyAlreadyBoundToApp(appGuid, request.getServiceInstanceId());

	try {
		String instance = instanceService
				.getInstanceIdForServiceInstance(request
						.getServiceInstanceId());

		ServiceInstanceBinding binding = new ServiceInstanceBinding(
				bindingId, request.getServiceInstanceId(),
				provider.getCreds(instance), null, appGuid);

		bindings.saveBinding(binding);
		log(bindingId, "Created service binding for app " + appGuid,
				COMPLETE);
		return binding;
	} catch (Exception e) {
		log(bindingId, "Failed to bind app " + appGuid, FAILED);
		throw e;
	}
}
 
开发者ID:krujos,项目名称:data-lifecycle-service-broker,代码行数:33,代码来源:LCServiceInstanceBindingService.java


示例17: setUp

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Before
public void setUp() throws ServiceInstanceBindingExistsException,
		ServiceBrokerException {
	MockitoAnnotations.initMocks(this);

	bindingService = new LCServiceInstanceBindingService(provider,
			instanceService, actionRepo, bindingManager);

	createServiceInstanceBindingRequest = new CreateServiceInstanceBindingRequest(
			"postgrescdm", COPY, "test_app").withBindingId(bindingId).and()
			.withServiceInstanceId(serviceInstance.getServiceInstanceId());
}
 
开发者ID:krujos,项目名称:data-lifecycle-service-broker,代码行数:13,代码来源:LCServiceInstanceBindingServiceCopyTest.java


示例18: duplicatePlansWithDifferentServiceInstancesAreGood

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
public void duplicatePlansWithDifferentServiceInstancesAreGood()
		throws ServiceInstanceBindingExistsException,
		ServiceBrokerException {
	assertNotNull(bindingService
			.createServiceInstanceBinding(createServiceInstanceBindingRequest));
	createServiceInstanceBindingRequest = new CreateServiceInstanceBindingRequest(
			"postgrescdm", COPY, "test_app")
			.withBindingId(bindingId + "foo").and()
			.withServiceInstanceId("Another service instance");
	assertNotNull(bindingService
			.createServiceInstanceBinding(createServiceInstanceBindingRequest));

}
 
开发者ID:krujos,项目名称:data-lifecycle-service-broker,代码行数:14,代码来源:LCServiceInstanceBindingServiceCopyTest.java


示例19: testCreateServiceInstanceBinding_success_saveAndReturnsNewServiceInstanceBindingWithCredentials

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Test
public void testCreateServiceInstanceBinding_success_saveAndReturnsNewServiceInstanceBindingWithCredentials()
    throws Exception {

    Location storingLocation = Location.newInstance("bindingId", "serviceInstanceId");
    when(store.getById(storingLocation)).thenReturn(Optional.empty());
    CreateServiceInstanceBindingRequest request = new CreateServiceInstanceBindingRequest(
        getServiceInstance("serviceId").getServiceDefinitionId(), "planId", "appGuid").
        withBindingId("bindingId").withServiceInstanceId("serviceInstanceId");

    ServiceInstanceBinding instance = service.createServiceInstanceBinding(request);

    verify(store).getById(storingLocation);
    verify(store).save(storingLocation, request);
}
 
开发者ID:trustedanalytics,项目名称:broker-store,代码行数:16,代码来源:ServiceInstanceBindingServiceStoreTest.java


示例20: testCreateServiceInstanceBinding_instanceAlreadyExists_throwsException

import org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest; //导入依赖的package包/类
@Test(expected = ServiceInstanceBindingExistsException.class)
public void testCreateServiceInstanceBinding_instanceAlreadyExists_throwsException()
    throws Exception {
    when(store.getById(any())).thenReturn(Optional.of(getRequest("id")));
    CreateServiceInstanceBindingRequest request = new CreateServiceInstanceBindingRequest(
        getServiceInstance("serviceId").getServiceDefinitionId(), "planId", "appGuid").
        withBindingId("bindingId").withServiceInstanceId("serviceId");
    service.createServiceInstanceBinding(request);
}
 
开发者ID:trustedanalytics,项目名称:broker-store,代码行数:10,代码来源:ServiceInstanceBindingServiceStoreTest.java



注:本文中的org.cloudfoundry.community.servicebroker.model.CreateServiceInstanceBindingRequest类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CloudBlobDirectory类代码示例发布时间:2022-05-22
下一篇:
Java BGABanner类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap