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

            bo.SetProperties("A", "A", "A", true, "A", "A", "A", "A", "A", "A");
            List <ApiWorkerResponseModel> response = mapper.MapBOToModel(new List <BOWorker>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
コード例 #2
0
        public void MapModelToBO()
        {
            var mapper = new BOLWorkerMapper();
            ApiWorkerRequestModel model = new ApiWorkerRequestModel();

            model.SetProperties("A", "A", true, "A", "A", "A", "A", "A", "A");
            BOWorker response = mapper.MapModelToBO("A", model);

            response.CommunicationStyle.Should().Be("A");
            response.Fingerprint.Should().Be("A");
            response.IsDisabled.Should().Be(true);
            response.JSON.Should().Be("A");
            response.MachinePolicyId.Should().Be("A");
            response.Name.Should().Be("A");
            response.RelatedDocumentIds.Should().Be("A");
            response.Thumbprint.Should().Be("A");
            response.WorkerPoolIds.Should().Be("A");
        }
コード例 #3
0
        public void MapBOToModel()
        {
            var      mapper = new BOLWorkerMapper();
            BOWorker bo     = new BOWorker();

            bo.SetProperties("A", "A", "A", true, "A", "A", "A", "A", "A", "A");
            ApiWorkerResponseModel response = mapper.MapBOToModel(bo);

            response.CommunicationStyle.Should().Be("A");
            response.Fingerprint.Should().Be("A");
            response.Id.Should().Be("A");
            response.IsDisabled.Should().Be(true);
            response.JSON.Should().Be("A");
            response.MachinePolicyId.Should().Be("A");
            response.Name.Should().Be("A");
            response.RelatedDocumentIds.Should().Be("A");
            response.Thumbprint.Should().Be("A");
            response.WorkerPoolIds.Should().Be("A");
        }