public async void TestGetItem_Account() { TradeServiceDAL service = new TradeServiceDAL(this.tableName); var accountlist = await service.GetItem(this.id); Console.WriteLine("list item details: " + ObjectHelper.ToJson(accountlist)); }
public async void TestGetAll_Accounts() { TradeServiceDAL service = new TradeServiceDAL(this.tableName); var accountlist = await service.GetAll(); Console.WriteLine("list count: " + accountlist.Count + ObjectHelper.ToJson(accountlist)); }
public async void TestUpdate_Account() { TradeServiceDAL service = new TradeServiceDAL(this.tableName); AccountEntity account = await service.GetItem(this.id); account.Trades[0].ExitDate = 12345; account.Trades[0].ExitPrice = 12.345; account.Trades[0].PL = 1.2; AccountEntity updateAccount = await service.Update(account); }
public async void TestInsertNewAccount() { TradeServiceDAL tradeService = new TradeServiceDAL(tableName); await tradeService.InsertNewTrade(new AccountEntity { Id = this.id, Name = "test account nae", Trades = new List <TradeEntity> { new TradeEntity { Code = "sub", EntryPrice = 123456, EntryDate = 123412321 }, new TradeEntity { Code = "rio", EntryPrice = 654321, EntryDate = 1, ExitPrice = 1.5, ExitDate = 123, PL = 0.9 }, } }); }
public TradeBLL(string tableName) { this.dal = new TradeServiceDAL(tableName); }
public async void TestDelete_Account() { TradeServiceDAL service = new TradeServiceDAL(this.tableName); await service.Delete(this.id); }