예제 #1
0
        private async Task <ApiAccountResponseModel> CreateRecord()
        {
            var model = new ApiAccountRequestModel();

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

            result.Success.Should().BeTrue();
            return(result.Record);
        }
예제 #2
0
        public void MapModelToBO()
        {
            var mapper = new BOLAccountMapper();
            ApiAccountRequestModel model = new ApiAccountRequestModel();

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

            response.AccountType.Should().Be("A");
            response.EnvironmentIds.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
            response.TenantIds.Should().Be("A");
            response.TenantTags.Should().Be("A");
        }
예제 #3
0
        public void MapRequestToResponse()
        {
            var mapper = new ApiAccountModelMapper();
            var model  = new ApiAccountRequestModel();

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

            response.AccountType.Should().Be("A");
            response.EnvironmentIds.Should().Be("A");
            response.Id.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
            response.TenantIds.Should().Be("A");
            response.TenantTags.Should().Be("A");
        }
예제 #4
0
        public void CreatePatch()
        {
            var mapper = new ApiAccountModelMapper();
            var model  = new ApiAccountRequestModel();

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

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

            patch.ApplyTo(response);
            response.AccountType.Should().Be("A");
            response.EnvironmentIds.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
            response.TenantIds.Should().Be("A");
            response.TenantTags.Should().Be("A");
        }