Пример #1
0
        public async Task DeleteOrganization()
        {
            var createdOrganization = await _organizationsApi.CreateOrganization(GenerateName("Constant Pro"));

            Assert.IsNotNull(createdOrganization);

            var foundOrganization = await _organizationsApi.FindOrganizationById(createdOrganization.Id);

            Assert.IsNotNull(foundOrganization);

            // delete task
            await _organizationsApi.DeleteOrganization(createdOrganization);

            var ioe = Assert.ThrowsAsync <HttpException>(async() =>
                                                         await _organizationsApi.FindOrganizationById(createdOrganization.Id));

            Assert.AreEqual("organization not found", ioe.Message);
        }