Exemplo n.º 1
0
        protected void ThenEventFirst <TEventDTO>(TEventDTO expectedEvent, TransactionReceipt transactionReceipt) where TEventDTO : IEventDTO, new()
        {
            TestLogger.LogExpectedEvent(expectedEvent);

            var eventItem  = ContractHandler.GetEvent <TEventDTO>();
            var eventFirst = eventItem.DecodeAllEventsForEvent(transactionReceipt.Logs).FirstOrDefault();

            Assert.NotNull(eventFirst);

            Stateprinter.Assert.AreEqual(
                Stateprinter.PrintObject(expectedEvent),
                Stateprinter.PrintObject(eventFirst.Event));
        }