public void CreatesEndpoint()
    {
        // Setup namespace and service for test
        var namespaceId = _fixture.RandomResourceId;
        var serviceId   = _fixture.RandomResourceId;

        _fixture.CreateNamespace(namespaceId);
        _fixture.CreateService(namespaceId, serviceId);

        var endpointId           = _fixture.RandomResourceId;
        var createEndpointSample = new CreateEndpointSample();

        var result = createEndpointSample.CreateEndpoint(_fixture.ProjectId, _fixture.LocationId, namespaceId, serviceId, endpointId);

        var endpointName = EndpointName.FromProjectLocationNamespaceServiceEndpoint(_fixture.ProjectId, _fixture.LocationId, namespaceId, serviceId, endpointId);
        RegistrationServiceClient registrationServiceClient = RegistrationServiceClient.Create();
        var endpoint = registrationServiceClient.GetEndpoint(endpointName);

        Assert.Equal(endpoint.Name, result.Name);
    }
Exemplo n.º 2
0
    public void CreateEndpoint(string namespaceId, string serviceId, string endpointId)
    {
        var createEndpointSample = new CreateEndpointSample();

        createEndpointSample.CreateEndpoint(ProjectId, LocationId, namespaceId, serviceId, endpointId);
    }