@@ -405,6 +405,9 @@ func loadBlockFromFile(path string) generated.Block {
405405 return ret
406406}
407407
408+
409+
410+
408411func TestFetchTransactions (t * testing.T ) {
409412 // Add in txnRows (with TxnBytes to parse), verify that they are properly serialized to generated.TransactionResponse
410413 tests := []struct {
@@ -662,6 +665,78 @@ func TestFetchTransactions(t *testing.T) {
662665 loadTransactionFromFile ("test_resources/heartbeat.response" ),
663666 },
664667 },
668+ {
669+ name : "Application txnAccess - Direct Address" ,
670+ txnBytes : [][]byte {
671+ loadResourceFileOrPanic ("test_resources/txnaccess_address.txn" ),
672+ },
673+ response : []generated.Transaction {
674+ loadTransactionFromFile ("test_resources/txnaccess_address.response" ),
675+ },
676+ },
677+ {
678+ name : "Application txnAccess - Direct App" ,
679+ txnBytes : [][]byte {
680+ loadResourceFileOrPanic ("test_resources/txnaccess_app.txn" ),
681+ },
682+ response : []generated.Transaction {
683+ loadTransactionFromFile ("test_resources/txnaccess_app.response" ),
684+ },
685+ },
686+ {
687+ name : "Application txnAccess - Direct Asset" ,
688+ txnBytes : [][]byte {
689+ loadResourceFileOrPanic ("test_resources/txnaccess_asset.txn" ),
690+ },
691+ response : []generated.Transaction {
692+ loadTransactionFromFile ("test_resources/txnaccess_asset.response" ),
693+ },
694+ },
695+ {
696+ name : "Application txnAccess - Asset Holding" ,
697+ txnBytes : [][]byte {
698+ loadResourceFileOrPanic ("test_resources/txnaccess_holding.txn" ),
699+ },
700+ response : []generated.Transaction {
701+ loadTransactionFromFile ("test_resources/txnaccess_holding.response" ),
702+ },
703+ },
704+ {
705+ name : "Application txnAccess - Local State" ,
706+ txnBytes : [][]byte {
707+ loadResourceFileOrPanic ("test_resources/txnaccess_local.txn" ),
708+ },
709+ response : []generated.Transaction {
710+ loadTransactionFromFile ("test_resources/txnaccess_local.response" ),
711+ },
712+ },
713+ {
714+ name : "Application txnAccess - Box Reference" ,
715+ txnBytes : [][]byte {
716+ loadResourceFileOrPanic ("test_resources/txnaccess_box.txn" ),
717+ },
718+ response : []generated.Transaction {
719+ loadTransactionFromFile ("test_resources/txnaccess_box.response" ),
720+ },
721+ },
722+ {
723+ name : "Application txnAccess - Multiple Types" ,
724+ txnBytes : [][]byte {
725+ loadResourceFileOrPanic ("test_resources/txnaccess_multiple.txn" ),
726+ },
727+ response : []generated.Transaction {
728+ loadTransactionFromFile ("test_resources/txnaccess_multiple.response" ),
729+ },
730+ },
731+ {
732+ name : "Application txnAccess - Empty Access Array" ,
733+ txnBytes : [][]byte {
734+ loadResourceFileOrPanic ("test_resources/txnaccess_empty.txn" ),
735+ },
736+ response : []generated.Transaction {
737+ loadTransactionFromFile ("test_resources/txnaccess_empty.response" ),
738+ },
739+ },
665740 }
666741
667742 // use for the branch below and createTxn helper func to add a new test case
0 commit comments