Exemple #1
0
        public async void GetAllUsersShouldReturnStatusCodeOk()
        {
            var result = await _fixture.GetHttpResult(UrlPath);

            result.Should().NotBeNull();
            result.StatusCode.Should().Be(HttpStatusCode.OK);

            var users = JsonConvert.DeserializeObject <List <UserDetailDto> >(result.Content.ReadAsStringAsync().Result);

            users.ForEach(dto => dto.Should().BeOfType <UserDetailDto>());
        }
        public async void GetFieldDefinitionsShouldReturnAListOfDtos()
        {
            var result = await _fixture.GetHttpResult($"{UrlPath}fieldDefinitions");

            result.Should().NotBeNull();
            result.StatusCode.Should().Be(HttpStatusCode.OK);

            var conferences = JsonConvert.DeserializeObject <List <FieldDefinitionDto> >(result.Content.ReadAsStringAsync().Result);

            conferences.ForEach(conference => conference.Should().BeOfType <FieldDefinitionDto>());
        }
Exemple #3
0
        public async void GetAllRolesShouldReturnAListOfRoleDtos()
        {
            var result = await _fixture.GetHttpResult(UrlPath);

            result.Should().NotBeNull();
            result.StatusCode.Should().Be(HttpStatusCode.OK);

            var applications = JsonConvert.DeserializeObject <List <RoleDto> >(result.Content.ReadAsStringAsync().Result);

            applications.Count.Should().Be(2);
            applications.ForEach(dto => dto.Should().BeOfType <RoleDto>());
        }
Exemple #4
0
        public async void GetPermissionsShouldReturnAListOfPermissionDtos()
        {
            var result = await _fixture.GetHttpResult(UrlPath);

            result.Should().NotBeNull();
            result.StatusCode.Should().Be(HttpStatusCode.OK);

            var permissions = JsonConvert.DeserializeObject <List <PermissionDto> >(result.Content.ReadAsStringAsync().Result);

            permissions.ForEach(conference => conference.Should().BeOfType <PermissionDto>());
        }
        public async void GetCommentByIdShouldReturnOneCommentDto()
        {
            var result = await _fixture.GetHttpResult(UrlPath + _commentId);

            result.Should().NotBeNull();
            result.StatusCode.Should().Be(HttpStatusCode.OK);

            var conferences = JsonConvert.DeserializeObject <CommentDto>(result.Content.ReadAsStringAsync().Result);

            conferences.Should().BeOfType(typeof(CommentDto));
        }
Exemple #6
0
        public async void GetAllFormsShouldReturnAListofFormDtos()
        {
            var result = await _fixture.GetHttpResult(UrlPath);

            result.Should().NotBeNull();
            result.StatusCode.Should().Be(HttpStatusCode.OK);

            var forms = JsonConvert.DeserializeObject <List <FormListDto> >(result.Content.ReadAsStringAsync().Result);

            forms.ForEach(form => form.Should().BeOfType <FormListDto>());
        }