private async Task <DataSet> InitializeAsync() { ISupplierDataServices supplier = _dataServices.GetSupplierDataServices(); DataSet set = await supplier.GetAsyncAllSupplierSummary(); return(set); }
public async Task Should_Give_SupplierSummary() { DataSet set = null; try { for (int i = 0; i < 10; i++) { set = await _supplierDataServices.GetAsyncAllSupplierSummary(); Assert.NotNull(set); Assert.Greater(set.Tables.Count, 0); Assert.NotNull(set.Tables[0]); int rowCounts = set.Tables[0].Rows.Count; Assert.Greater(set.Tables[0].Rows.Count, 0); Assert.NotNull(set.Tables[0].Rows[0][0]); for (int k = 0; k < rowCounts; ++k) { string value = set.Tables[0].Rows[k][0] as string; Assert.NotNull(value); Assert.LessOrEqual(value.Length, 7); } } } catch (Exception e) { Console.WriteLine(e); throw; } }