コード例 #1
0
        public void MapBOToModelList()
        {
            var           mapper = new BOLCertificateMapper();
            BOCertificate bo     = new BOCertificate();

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

            response.Count.Should().Be(1);
        }
コード例 #2
0
        public void MapBOToModel()
        {
            var           mapper = new BOLCertificateMapper();
            BOCertificate bo     = new BOCertificate();

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

            response.Archived.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.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1));
            response.EnvironmentIds.Should().Be("A");
            response.Id.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
            response.NotAfter.Should().Be(DateTimeOffset.Parse("1/1/1987 12:00:00 AM"));
            response.Subject.Should().Be("A");
            response.TenantIds.Should().Be("A");
            response.TenantTags.Should().Be("A");
            response.Thumbprint.Should().Be("A");
        }