コード例 #1
0
        public void MapBOToModel()
        {
            var mapper = new BOLDeploymentRelatedMachineMapper();
            BODeploymentRelatedMachine bo = new BODeploymentRelatedMachine();

            bo.SetProperties(1, "A", "A");
            ApiDeploymentRelatedMachineResponseModel response = mapper.MapBOToModel(bo);

            response.DeploymentId.Should().Be("A");
            response.Id.Should().Be(1);
            response.MachineId.Should().Be("A");
        }
コード例 #2
0
        public void MapBOToModelList()
        {
            var mapper = new BOLDeploymentRelatedMachineMapper();
            BODeploymentRelatedMachine bo = new BODeploymentRelatedMachine();

            bo.SetProperties(1, "A", "A");
            List <ApiDeploymentRelatedMachineResponseModel> response = mapper.MapBOToModel(new List <BODeploymentRelatedMachine>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }