示例#1
0
        public void MapModelToBO()
        {
            var mapper = new BOLDeviceActionMapper();
            ApiDeviceActionRequestModel model = new ApiDeviceActionRequestModel();

            model.SetProperties(1, "A", "A");
            BODeviceAction response = mapper.MapModelToBO(1, model);

            response.DeviceId.Should().Be(1);
            response.Name.Should().Be("A");
            [email protected]().Be("A");
        }
示例#2
0
        public void MapBOToModelList()
        {
            var            mapper = new BOLDeviceActionMapper();
            BODeviceAction bo     = new BODeviceAction();

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

            response.Count.Should().Be(1);
        }
示例#3
0
        public void MapBOToModel()
        {
            var            mapper = new BOLDeviceActionMapper();
            BODeviceAction bo     = new BODeviceAction();

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

            response.DeviceId.Should().Be(1);
            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
            [email protected]().Be("A");
        }
示例#4
0
        public void MapEFToBO()
        {
            var          mapper = new DALDeviceActionMapper();
            DeviceAction entity = new DeviceAction();

            entity.SetProperties(1, 1, "A", "A");

            BODeviceAction response = mapper.MapEFToBO(entity);

            response.DeviceId.Should().Be(1);
            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
            [email protected]().Be("A");
        }
示例#5
0
        public void MapBOToEF()
        {
            var mapper = new DALDeviceActionMapper();
            var bo     = new BODeviceAction();

            bo.SetProperties(1, 1, "A", "A");

            DeviceAction response = mapper.MapBOToEF(bo);

            response.DeviceId.Should().Be(1);
            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
            [email protected]().Be("A");
        }