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"); }
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); }
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"); }
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"); }
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"); }