コード例 #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");
        }