Пример #1
0
        public async Task CompanyDelete(int companyId)
        {
            using (var client = new LogClientProvider().Client)
            {
                var response = await client.DeleteAsync(String.Format("/api/company/{0}", companyId));

                response.EnsureSuccessStatusCode();
                response.StatusCode.Should().Be(HttpStatusCode.OK);
            }
        }
Пример #2
0
        public async Task CompanyFilter()
        {
            using (var client = new LogClientProvider().Client)
            {
                var response = await client.GetAsync("/api/company/companyFilter");

                response.EnsureSuccessStatusCode();
                response.StatusCode.Should().Be(HttpStatusCode.OK);
            }
        }
Пример #3
0
        public async Task CompanyUpdate(CompanyDTO companyDTO)
        {
            using (var client = new LogClientProvider().Client)
            {
                var response = await client.PutAsync("/api/company",
                                                     new StringContent(JsonConvert.SerializeObject(companyDTO), Encoding.UTF8, "application/json"));

                response.EnsureSuccessStatusCode();
                response.StatusCode.Should().Be(HttpStatusCode.OK);
            }
        }