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

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

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

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

            response.ContentType.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
            response.VariableSetId.Should().Be("A");
        }
Example #3
0
        public void MapRequestToResponse()
        {
            var mapper = new ApiLibraryVariableSetModelMapper();
            var model  = new ApiLibraryVariableSetRequestModel();

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

            response.ContentType.Should().Be("A");
            response.Id.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
            response.VariableSetId.Should().Be("A");
        }
Example #4
0
        public void CreatePatch()
        {
            var mapper = new ApiLibraryVariableSetModelMapper();
            var model  = new ApiLibraryVariableSetRequestModel();

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

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

            patch.ApplyTo(response);
            response.ContentType.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
            response.VariableSetId.Should().Be("A");
        }