public void MapEFToBOList()
        {
            var          mapper = new DALInterruptionMapper();
            Interruption entity = new Interruption();

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

            List <BOInterruption> response = mapper.MapEFToBO(new List <Interruption>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
Esempio n. 2
0
        public virtual Interruption MapBOToEF(
            BOInterruption bo)
        {
            Interruption efInterruption = new Interruption();

            efInterruption.SetProperties(
                bo.Created,
                bo.EnvironmentId,
                bo.Id,
                bo.JSON,
                bo.ProjectId,
                bo.RelatedDocumentIds,
                bo.ResponsibleTeamIds,
                bo.Status,
                bo.TaskId,
                bo.TenantId,
                bo.Title);
            return(efInterruption);
        }
        public void MapEFToBO()
        {
            var          mapper = new DALInterruptionMapper();
            Interruption entity = new Interruption();

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

            BOInterruption response = mapper.MapEFToBO(entity);

            response.Created.Should().Be(DateTimeOffset.Parse("1/1/1987 12:00:00 AM"));
            response.EnvironmentId.Should().Be("A");
            response.Id.Should().Be("A");
            response.JSON.Should().Be("A");
            response.ProjectId.Should().Be("A");
            response.RelatedDocumentIds.Should().Be("A");
            response.ResponsibleTeamIds.Should().Be("A");
            response.Status.Should().Be("A");
            response.TaskId.Should().Be("A");
            response.TenantId.Should().Be("A");
            response.Title.Should().Be("A");
        }