Exemple #1
0
        public void MapBOToModelList()
        {
            var        mapper = new BOLDocumentMapper();
            BODocument bo     = new BODocument();

            bo.SetProperties(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), 1, BitConverter.GetBytes(1), 1, "A", "A", "A", true, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, "A", 1, "A");
            List <ApiDocumentResponseModel> response = mapper.MapBOToModel(new List <BODocument>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
Exemple #2
0
        public void MapBOToModel()
        {
            var        mapper = new BOLDocumentMapper();
            BODocument bo     = new BODocument();

            bo.SetProperties(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), 1, BitConverter.GetBytes(1), 1, "A", "A", "A", true, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, "A", 1, "A");
            ApiDocumentResponseModel response = mapper.MapBOToModel(bo);

            response.ChangeNumber.Should().Be(1);
            response.Document1.Should().BeEquivalentTo(BitConverter.GetBytes(1));
            response.DocumentLevel.Should().Be(1);
            response.DocumentSummary.Should().Be("A");
            response.FileExtension.Should().Be("A");
            response.FileName.Should().Be("A");
            response.FolderFlag.Should().Be(true);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Owner.Should().Be(1);
            response.Revision.Should().Be("A");
            response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            response.Status.Should().Be(1);
            response.Title.Should().Be("A");
        }