private async Task <ApiDeploymentResponseModel> CreateRecord() { var model = new ApiDeploymentRequestModel(); model.SetProperties("B", DateTimeOffset.Parse("1/1/1988 12:00:00 AM"), "B", "B", "B", "B", "B", "B", "B", "B", "B", "B"); CreateResponse <ApiDeploymentResponseModel> result = await this.Client.DeploymentCreateAsync(model); result.Success.Should().BeTrue(); return(result.Record); }
public void MapModelToBO() { var mapper = new BOLDeploymentMapper(); ApiDeploymentRequestModel model = new ApiDeploymentRequestModel(); model.SetProperties("A", DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", "A", "A", "A", "A", "A", "A", "A"); BODeployment response = mapper.MapModelToBO("A", model); response.ChannelId.Should().Be("A"); response.Created.Should().Be(DateTimeOffset.Parse("1/1/1987 12:00:00 AM")); response.DeployedBy.Should().Be("A"); response.DeployedToMachineIds.Should().Be("A"); response.EnvironmentId.Should().Be("A"); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.ProjectGroupId.Should().Be("A"); response.ProjectId.Should().Be("A"); response.ReleaseId.Should().Be("A"); response.TaskId.Should().Be("A"); response.TenantId.Should().Be("A"); }
public void CreatePatch() { var mapper = new ApiDeploymentModelMapper(); var model = new ApiDeploymentRequestModel(); model.SetProperties("A", DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", "A", "A", "A", "A", "A", "A", "A"); JsonPatchDocument <ApiDeploymentRequestModel> patch = mapper.CreatePatch(model); var response = new ApiDeploymentRequestModel(); patch.ApplyTo(response); response.ChannelId.Should().Be("A"); response.Created.Should().Be(DateTimeOffset.Parse("1/1/1987 12:00:00 AM")); response.DeployedBy.Should().Be("A"); response.DeployedToMachineIds.Should().Be("A"); response.EnvironmentId.Should().Be("A"); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.ProjectGroupId.Should().Be("A"); response.ProjectId.Should().Be("A"); response.ReleaseId.Should().Be("A"); response.TaskId.Should().Be("A"); response.TenantId.Should().Be("A"); }