Exemplo n.º 1
0
        public void DeleteUserData_Success()
        {
            IClient  client  = Substitute.For <IClient>();
            IRequest request = Substitute.For <IRequest>();

            client.DeleteAsync(Arg.Any <string>())
            .Returns(request);

            TextToSpeechService service = new TextToSpeechService(client);

            var customerId = "customerId";

            var result = service.DeleteUserData(customerId: customerId);
        }
        public void DeleteUserData()
        {
            IamAuthenticator authenticator = new IamAuthenticator(
                apikey: "{apikey}");

            TextToSpeechService service = new TextToSpeechService(authenticator);

            service.SetServiceUrl("{serviceUrl}");

            var result = service.DeleteUserData(
                customerId: "customer_ID"
                );

            Console.WriteLine(result.StatusCode);
        }
Exemplo n.º 3
0
        public void DeleteUserData()
        {
            TokenOptions tokenOptions = new TokenOptions()
            {
                IamApiKey  = apikey,
                ServiceUrl = url
            };

            TextToSpeechService service = new TextToSpeechService(tokenOptions);

            var result = service.DeleteUserData(
                customerId: "customerId"
                );

            Console.WriteLine(result.StatusCode);
        }
Exemplo n.º 4
0
        private BaseModel DeleteUserData(string customerId, Dictionary <string, object> customData = null)
        {
            Console.WriteLine("\nAttempting to DeleteUserData()");
            var result = service.DeleteUserData(customerId: customerId, customData: customData);

            if (result != null)
            {
                Console.WriteLine("DeleteUserData() succeeded:\n{0}", JsonConvert.SerializeObject(result, Formatting.Indented));
            }
            else
            {
                Console.WriteLine("Failed to DeleteUserData()");
            }

            return(result);
        }
Exemplo n.º 5
0
        public void DeleteUserData()
        {
            IamConfig config = new IamConfig(
                apikey: apikey
                );

            TextToSpeechService service = new TextToSpeechService(config);

            service.SetEndpoint(url);

            var result = service.DeleteUserData(
                customerId: "customerId"
                );

            Console.WriteLine(result.StatusCode);
        }
        public IEnumerator TestDeleteUserData()
        {
            Log.Debug("TextToSpeechServiceV1IntegrationTests", "Attempting to DeleteUserData...");
            object deleteUserDataResponse = null;

            service.DeleteUserData(
                callback: (DetailedResponse <object> response, IBMError error) =>
            {
                Log.Debug("TextToSpeechServiceV1IntegrationTests", "DeleteUserData result: {0}", response.Response);
                deleteUserDataResponse = response.Result;
                Assert.IsNotNull(deleteUserDataResponse);
                Assert.IsNull(error);
            },
                customerId: "customerId"
                );

            while (deleteUserDataResponse == null)
            {
                yield return(null);
            }
        }