public void Entity_TicketRedeem_End_G2H() { FFMsg_G2H msg = FreeformEntityFactory.CreateEntity <FFMsg_G2H>(FF_FlowDirection.G2H, new FFCreateEntityRequest_G2H() { MessageType = FF_AppId_G2H_MessageTypes.FreeForm, Command = FF_AppId_G2H_Commands.ResponseRequest, SessionID = FF_AppId_SessionIds.Tickets, TransactionID = 1, }); FFTgt_B2B_TicketInfo tgt = new FFTgt_B2B_TicketInfo(); msg.AddTarget(tgt); FFTgt_G2H_Ticket_Redemption_Close tgt2 = new FFTgt_G2H_Ticket_Redemption_Close(); tgt.AddTarget(tgt2); tgt2.Status = FF_AppId_TicketRedemption_Close_Status.Success; tgt2.Barcode = "100000000078789098"; tgt2.Amount = 9856; tgt2.Type = FF_AppId_TicketTypes.Cashable; byte[] buffer = FreeformEntityFactory.CreateBuffer(FF_FlowDirection.G2H, msg); string sBuffer = buffer.GetConvertBytesToHexString(string.Empty); Assert.AreEqual(sBuffer, "[05][A2][BC][8A][01][00][01][00][01][00][12][0A][10][04][00][10][00][00][00][00][78][78][90][98][00][00][98][56][00][CA]"); }
protected override IMonitorEntity_MsgTgt CreateMonitorTarget(IMonitorEntity parent, IFreeformEntity_MsgTgt request) { FFTgt_G2H_Ticket_Redemption_Close tgtSrc = request as FFTgt_G2H_Ticket_Redemption_Close; if (tgtSrc != null) { MonTgt_G2H_Ticket_Redemption_Close tgtDest = new MonTgt_G2H_Ticket_Redemption_Close() { Barcode = tgtSrc.Barcode, Amount = tgtSrc.Amount, Type = tgtSrc.Type, Status = tgtSrc.Status, }; return(tgtDest); } return(null); }