public void TestGetTransactionsByAddressesShouldIncludeAllParameters() { var restClientMock = new Mock <IRestClient>(); restClientMock.Setup(r => r.Execute <Transactions>(It.IsAny <IRestRequest>())).Returns( () => { var restResponse = new RestResponse <Transactions> { Data = new Transactions { Hashes = new List <string> { "EJEAOOZYSAWFPZQESYDHZCGYNSTWXUMVJOVDWUNZJXDGWCLUFGIMZRMGCAZGKNPLBRLGUNYWKLJTYEAQX" } } }; return(restResponse); }); var repository = new RestIotaRepository(restClientMock.Object); var transactions = repository.GetTransactionsByAddresses(new List <string> { "RBTC9D9DCDEAUCFDCDADEAMBHAFAHKAJDHAODHADHDAD9KAHAJDADHJSGDJHSDGSDPODHAUDUAHDJAHAB" }); Assert.AreEqual("EJEAOOZYSAWFPZQESYDHZCGYNSTWXUMVJOVDWUNZJXDGWCLUFGIMZRMGCAZGKNPLBRLGUNYWKLJTYEAQX", transactions.Hashes[0]); }
/// <summary> /// The main. /// </summary> /// <param name="args"> /// The args. /// </param> private static void Main(string[] args) { var repository = new RestIotaRepository(new RestClient("https://localhost:14265")); var nodeInfo = repository.GetNodeInfo(); var neighbours = repository.GetNeighbors(); var transactions = repository.GetTransactionsByAddresses( new List <string> { "GVZSJANZQULQICZFXJHHAFJTWEITWKQYJKU9TYFA9AFJLVIYOUCFQRYTLKRGCVY9KPOCCHK99TTKQGXA9" }); var balances = repository.GetBalances( new List <string> { "GVZSJANZQULQICZFXJHHAFJTWEITWKQYJKU9TYFA9AFJLVIYOUCFQRYTLKRGCVY9KPOCCHK99TTKQGXA9", "HBBYKAKTILIPVUKFOTSLHGENPTXYBNKXZFQFR9VQFWNBMTQNRVOUKPVPRNBSZVVILMAFBKOTBLGLWLOHQ999999999" }, 100); Console.WriteLine("Done"); Console.ReadKey(); }