public void BuildTicketCashoutDtoFromTicketTest() { var ticket = TicketBuilderHelper.GetTicketCashout(); var dto = new TicketCashoutMapper().Map(ticket); TicketCompareHelper.Compare(ticket, dto); }
public void SerializeTicketCashoutTest() { var ticket = TicketBuilderHelper.GetTicketCashout(); var serialized = JsonConvert.SerializeObject(ticket); var deserializedTicket = JsonUtils.Deserialize <ITicketCashout>(serialized); var serializedAgain = JsonUtils.Serialize(deserializedTicket); Assert.AreEqual(serialized, serializedAgain); }
public void TicketCashoutToJsonTest() { var ticket = TicketBuilderHelper.GetTicketCashout(); var dto = new TicketCashoutMapper().Map(ticket); var ticketJson = ticket.ToJson(); var dtoJson = dto.ToJson(); CheckMandatoryFields(ticketJson); CheckMandatoryFields(dtoJson); Assert.AreEqual(ticketJson, dtoJson); }