Exemple #1
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");
        }
Exemple #2
0
        public void MapEFToBOList()
        {
            var          mapper = new DALDeviceActionMapper();
            DeviceAction entity = new DeviceAction();

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

            List <BODeviceAction> response = mapper.MapEFToBO(new List <DeviceAction>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
Exemple #3
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");
        }