コード例 #1
0
 public void TestInit()
 {
     cfService      = new CloudFoundryService(services);
     fakeCfInstance = new CloudFoundryInstance("fake cf", fakeValidTarget, fakeValidAccessToken);
     fakeOrg        = new CloudFoundryOrganization("fake org", "fake org guid", fakeCfInstance);
     fakeSpace      = new CloudFoundrySpace("fake space", "fake space guid", fakeOrg);
     fakeApp        = new CloudFoundryApp("fake app", "fake app guid", fakeSpace);
 }
コード例 #2
0
 public Bind()
 {
     Routes.MapHttpRoute("create_binding", "v2/service_instances/{instanceId}/service_bindings/{bindingId}");
     var catalog = new Catalog(Substitute.For<IDatabaseBuilder>());
     service = Substitute.For<ICloudFoundryService>();
     serviceId = Guid.NewGuid();
     catalog.Services.Add(serviceId.ToString(), service);
     controller = new CatalogController(catalog);
 }
コード例 #3
0
            public Provision()
            {
                Routes.MapHttpRoute("provision", "v2/service_instances/{instanceId}");
                var catalog = new Catalog(Substitute.For <IDatabaseBuilder>());

                service   = Substitute.For <ICloudFoundryService>();
                serviceId = Guid.NewGuid();
                catalog.Services.Add(serviceId.ToString(), service);
                controller = new CatalogController(catalog);
            }