示例#1
0
        public void MapBOToModelList()
        {
            var        mapper = new BOLArtifactMapper();
            BOArtifact bo     = new BOArtifact();

            bo.SetProperties("A", DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", "A", "A", "A");
            List <ApiArtifactResponseModel> response = mapper.MapBOToModel(new List <BOArtifact>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
示例#2
0
        public void MapBOToModel()
        {
            var        mapper = new BOLArtifactMapper();
            BOArtifact bo     = new BOArtifact();

            bo.SetProperties("A", DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", "A", "A", "A");
            ApiArtifactResponseModel response = mapper.MapBOToModel(bo);

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