Beispiel #1
0
        public void TestRemoveAuditorWithOrganizationByUsernameRequest()
        {
            string json = @"{
  ""username"": ""*****@*****.**""
}";

            RemoveAuditorWithOrganizationByUsernameRequest request = new RemoveAuditorWithOrganizationByUsernameRequest();

            request.Username = "******";
            string result = JsonConvert.SerializeObject(request, Formatting.None);

            Assert.AreEqual(TestUtil.ToUnformatedJsonString(json), result);
        }
        /// <summary>
        /// Remove Auditor with the Organization by Username
        /// <para>For detailed information, see online documentation at: "http://apidocs.cloudfoundry.org/250/organizations/remove_auditor_with_the_organization_by_username.html"</para>
        /// </summary>
        public async Task RemoveAuditorWithOrganizationByUsername(Guid?guid, RemoveAuditorWithOrganizationByUsernameRequest value)
        {
            UriBuilder uriBuilder = new UriBuilder(this.Client.CloudTarget);

            uriBuilder.Path = string.Format(CultureInfo.InvariantCulture, "v2/organizations/{0}/auditors", guid);
            var client = this.GetHttpClient();

            client.Uri    = uriBuilder.Uri;
            client.Method = HttpMethod.Delete;


            client.Content = ((string)JsonConvert.SerializeObject(value)).ConvertToStream();
            var expectedReturnStatus = 204;
            var response             = await this.SendAsync(client, expectedReturnStatus);
        }