Ejemplo n.º 1
0
        private async Task <ApiProjectResponseModel> CreateRecord()
        {
            var model = new ApiProjectRequestModel();

            model.SetProperties(true, BitConverter.GetBytes(2), "B", true, "B", true, "B", "B", "B", "B", "B", "B");
            CreateResponse <ApiProjectResponseModel> result = await this.Client.ProjectCreateAsync(model);

            result.Success.Should().BeTrue();
            return(result.Record);
        }
Ejemplo n.º 2
0
        public void MapModelToBO()
        {
            var mapper = new BOLProjectMapper();
            ApiProjectRequestModel model = new ApiProjectRequestModel();

            model.SetProperties(true, BitConverter.GetBytes(1), "A", true, "A", true, "A", "A", "A", "A", "A", "A");
            BOProject response = mapper.MapModelToBO("A", model);

            response.AutoCreateRelease.Should().Be(true);
            response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1));
            response.DeploymentProcessId.Should().Be("A");
            response.DiscreteChannelRelease.Should().Be(true);
            response.IncludedLibraryVariableSetIds.Should().Be("A");
            response.IsDisabled.Should().Be(true);
            response.JSON.Should().Be("A");
            response.LifecycleId.Should().Be("A");
            response.Name.Should().Be("A");
            response.ProjectGroupId.Should().Be("A");
            response.Slug.Should().Be("A");
            response.VariableSetId.Should().Be("A");
        }
Ejemplo n.º 3
0
        public void CreatePatch()
        {
            var mapper = new ApiProjectModelMapper();
            var model  = new ApiProjectRequestModel();

            model.SetProperties(true, BitConverter.GetBytes(1), "A", true, "A", true, "A", "A", "A", "A", "A", "A");

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

            patch.ApplyTo(response);
            response.AutoCreateRelease.Should().Be(true);
            response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1));
            response.DeploymentProcessId.Should().Be("A");
            response.DiscreteChannelRelease.Should().Be(true);
            response.IncludedLibraryVariableSetIds.Should().Be("A");
            response.IsDisabled.Should().Be(true);
            response.JSON.Should().Be("A");
            response.LifecycleId.Should().Be("A");
            response.Name.Should().Be("A");
            response.ProjectGroupId.Should().Be("A");
            response.Slug.Should().Be("A");
            response.VariableSetId.Should().Be("A");
        }