Example #1
0
        private async Task <ApiInvitationResponseModel> CreateRecord()
        {
            var model = new ApiInvitationRequestModel();

            model.SetProperties("B", "B");
            CreateResponse <ApiInvitationResponseModel> result = await this.Client.InvitationCreateAsync(model);

            result.Success.Should().BeTrue();
            return(result.Record);
        }
        public void MapModelToBO()
        {
            var mapper = new BOLInvitationMapper();
            ApiInvitationRequestModel model = new ApiInvitationRequestModel();

            model.SetProperties("A", "A");
            BOInvitation response = mapper.MapModelToBO("A", model);

            response.InvitationCode.Should().Be("A");
            response.JSON.Should().Be("A");
        }
Example #3
0
        public void MapRequestToResponse()
        {
            var mapper = new ApiInvitationModelMapper();
            var model  = new ApiInvitationRequestModel();

            model.SetProperties("A", "A");
            ApiInvitationResponseModel response = mapper.MapRequestToResponse("A", model);

            response.Id.Should().Be("A");
            response.InvitationCode.Should().Be("A");
            response.JSON.Should().Be("A");
        }
Example #4
0
        public void CreatePatch()
        {
            var mapper = new ApiInvitationModelMapper();
            var model  = new ApiInvitationRequestModel();

            model.SetProperties("A", "A");

            JsonPatchDocument <ApiInvitationRequestModel> patch = mapper.CreatePatch(model);
            var response = new ApiInvitationRequestModel();

            patch.ApplyTo(response);
            response.InvitationCode.Should().Be("A");
            response.JSON.Should().Be("A");
        }