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

            RemoveManagerWithOrganizationByUsernameRequest request = new RemoveManagerWithOrganizationByUsernameRequest();

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

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

            uriBuilder.Path = string.Format(CultureInfo.InvariantCulture, "v2/organizations/{0}/managers", 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);
        }