public void CreatesService() { // Setup namespace for the test. var namespaceId = _fixture.RandomResourceId; _fixture.CreateNamespace(namespaceId); var serviceId = _fixture.RandomResourceId; // Run the sample code. var createServiceSample = new CreateServiceSample(); var result = createServiceSample.CreateService(_fixture.ProjectId, _fixture.LocationId, namespaceId, serviceId); // Get the service. var serviceName = ServiceName.FromProjectLocationNamespaceService(_fixture.ProjectId, _fixture.LocationId, namespaceId, serviceId); RegistrationServiceClient registrationServiceClient = RegistrationServiceClient.Create(); var service = registrationServiceClient.GetService(serviceName); Assert.Contains(serviceId, service.Name); }
public void CreateService(string namespaceId, string serviceId) { var createServiceSample = new CreateServiceSample(); createServiceSample.CreateService(ProjectId, LocationId, namespaceId, serviceId); }