/// <summary> /// Отправляет запрос на получение информации по остаткам на складе. /// </summary> /// <param name="request">Запрос.</param> /// <returns>Ответ.</returns> public GetWarehouseItemsResponse GetWarehouseItems(GetWarehouseItemsRequest request) { SignRequest(request); return(SendData(serializer => serializer.Serialize(request), (s, serializer) => serializer.DeserializeGetWarehouseItemsResponse(s))); }
public void GetWarehouseItemsRequestTest() { var message = new GetWarehouseItemsRequest(); Assert.AreEqual(message.Kind, MessageKind.GetWarehouseItemsRequest); message.UserID = Guid.NewGuid(); var serializer = new ProtocolSerializer(ProtocolVersion.Version10); var data = serializer.Serialize(message); Assert.IsNotNull(data); Assert.AreEqual(serializer.GetMessageInfoOrNull(data).Kind, MessageKind.GetWarehouseItemsRequest); var savedMessage = serializer.DeserializeGetWarehouseItemsRequest(data); Assert.IsNotNull(savedMessage); Assert.AreEqual(message.Kind, savedMessage.Kind); Assert.AreEqual(message.UserID, savedMessage.UserID); }