コード例 #1
0
        public async Task Test_GET()
        {
            using var client = new TestClientProviderA().Client;
            var response = await client.GetAsync("/api");

            response.StatusCode.Should().Be(HttpStatusCode.OK);
        }
コード例 #2
0
        public async Task Test_GetStoryById()
        {
            using var client = new TestClientProviderA().Client;
            var response = await client.GetAsync("/api/items/getStoryById/23941710");

            response.StatusCode.Should().Be(HttpStatusCode.OK);
            response.RequestMessage.Method.Should().Be(response.RequestMessage.Method);
            response.Content.Headers.ContentType.Should().Be(response.Content.Headers.ContentType);
        }
コード例 #3
0
        public async Task Test_GetUserSubmittedByName()
        {
            using var client = new TestClientProviderA().Client;
            var response = await client.GetAsync("/api/users/getUserItemsByName/fipar");

            response.StatusCode.Should().Be(HttpStatusCode.OK);
            response.RequestMessage.Method.Should().Be(response.RequestMessage.Method);
            response.Content.Headers.ContentType.Should().Be(response.Content.Headers.ContentType);
        }