コード例 #1
0
        public virtual DeploymentHistory MapBOToEF(
            BODeploymentHistory bo)
        {
            DeploymentHistory efDeploymentHistory = new DeploymentHistory();

            efDeploymentHistory.SetProperties(
                bo.ChannelId,
                bo.ChannelName,
                bo.CompletedTime,
                bo.Created,
                bo.DeployedBy,
                bo.DeploymentId,
                bo.DeploymentName,
                bo.DurationSeconds,
                bo.EnvironmentId,
                bo.EnvironmentName,
                bo.ProjectId,
                bo.ProjectName,
                bo.ProjectSlug,
                bo.QueueTime,
                bo.ReleaseId,
                bo.ReleaseVersion,
                bo.StartTime,
                bo.TaskId,
                bo.TaskState,
                bo.TenantId,
                bo.TenantName);
            return(efDeploymentHistory);
        }
コード例 #2
0
        public void MapEFToBO()
        {
            var mapper = new DALDeploymentHistoryMapper();
            DeploymentHistory entity = new DeploymentHistory();

            entity.SetProperties("A", "A", DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", 1, "A", "A", "A", "A", "A", DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), "A", "A", DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", "A");

            BODeploymentHistory response = mapper.MapEFToBO(entity);

            response.ChannelId.Should().Be("A");
            response.ChannelName.Should().Be("A");
            response.CompletedTime.Should().Be(DateTimeOffset.Parse("1/1/1987 12:00:00 AM"));
            response.Created.Should().Be(DateTimeOffset.Parse("1/1/1987 12:00:00 AM"));
            response.DeployedBy.Should().Be("A");
            response.DeploymentId.Should().Be("A");
            response.DeploymentName.Should().Be("A");
            response.DurationSeconds.Should().Be(1);
            response.EnvironmentId.Should().Be("A");
            response.EnvironmentName.Should().Be("A");
            response.ProjectId.Should().Be("A");
            response.ProjectName.Should().Be("A");
            response.ProjectSlug.Should().Be("A");
            response.QueueTime.Should().Be(DateTimeOffset.Parse("1/1/1987 12:00:00 AM"));
            response.ReleaseId.Should().Be("A");
            response.ReleaseVersion.Should().Be("A");
            response.StartTime.Should().Be(DateTimeOffset.Parse("1/1/1987 12:00:00 AM"));
            response.TaskId.Should().Be("A");
            response.TaskState.Should().Be("A");
            response.TenantId.Should().Be("A");
            response.TenantName.Should().Be("A");
        }
コード例 #3
0
        public void MapEFToBOList()
        {
            var mapper = new DALDeploymentHistoryMapper();
            DeploymentHistory entity = new DeploymentHistory();

            entity.SetProperties("A", "A", DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", 1, "A", "A", "A", "A", "A", DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), "A", "A", DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", "A");

            List <BODeploymentHistory> response = mapper.MapEFToBO(new List <DeploymentHistory>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }