public async Task DataTableDictionaries() { using (var con = new SqlConnection(connectionString)) { var sproc = new dboSelectMultipleStatement(); var cmd = sproc.Build(con); var loader = new DynamicLoader(); await con.OpenAsync(); var adapter = new SqlDataAdapter(cmd); var ds = new DataSet(); adapter.Fill(ds); var objs = loader.Dictionaries(ds.Tables[0]); Assert.IsNotNull(objs); var i = 0; foreach (var obj in objs) { Assert.AreEqual(i, obj["Identifier"]); i++; } } }
public void DictionariesIDataReaderNull() { var l = new DynamicLoader(); l.Dictionaries((IDataReader)null); }
public void DictionariesDataSetNull() { var l = new DynamicLoader(); l.Dictionaries((DataSet)null); }
public void DictionariesIDbCommandNull() { var l = new DynamicLoader(); l.Dictionaries((IDbCommand)null); }
public async Task IDbCommandDictionaries() { using (var con = new SqlConnection(connectionString)) { var sproc = new dboSelectMultipleStatement(); var cmd = sproc.Build(con); var loader = new DynamicLoader(); await con.OpenAsync(); var objs = loader.Dictionaries(cmd); Assert.IsNotNull(objs); var i = 0; foreach (var obj in objs) { Assert.AreEqual(i, obj["Identifier"]); i++; } } }