public async Task Get_My_Assets_Will_InvokeGet_From_BlockchainService() { mockBlockService.Setup(m => m.InvokeGet(HyperledgerConsts.TraderQueryURL(TestJsonObjectConsts.trader1ID))) .ReturnsAsync(TestJsonObjectConsts.trader1); mockBlockService.Setup(m => m.InvokePostAuthentication(FlaskConsts.LoginUrl, JsonConvert.SerializeObject(user))) .ReturnsAsync(TestJsonObjectConsts.trader1AuthenticationMessage); mockBlockService.Setup(m => m.InvokeGet(HyperledgerConsts.MyAssetsUrl(TestJsonObjectConsts.trader1ID))) .ReturnsAsync("[]"); await clientWithMock.Login(user); List <Property> results = await clientWithMock.GetMyProperties(); mockBlockService.Verify(m => m.InvokeGet(HyperledgerConsts.TraderQueryURL(TestJsonObjectConsts.trader1ID))); }
void updateAssetList(BlockchainClient localClient) { properties.Clear(); var props = Task.Run(() => localClient.GetMyProperties()).Result; foreach (Property obj in props) { properties.Add(obj); } }
public async Task CreatePackage() { var results = await client.GetMyProperties(); await Navigation.PushAsync(new CreatePackagePage(client, results)); }