public void DynamicsIDbCommandNull()
 {
     var l = new DynamicLoader();
     l.Dynamics((IDbCommand)null);
 }
 public void DynamicsIDataReaderNull()
 {
     var l = new DynamicLoader();
     l.Dynamics((IDataReader)null);
 }
        public async Task IDbCommandDynamics()
        {
            var sproc = new dboSelectMultipleStatement();
            var loader = new DynamicLoader();

            using (var con = new SqlConnection(connectionString))
            {
                var cmd = sproc.Build(con);

                await con.OpenAsync();
                var objs = loader.Dynamics(cmd);

                Assert.IsNotNull(objs);

                var i = 0;
                foreach (var obj in objs)
                {
                    Assert.AreEqual(i, obj.Identifier);
                    i++;
                }
            }
        }
 public void DynamicsDataSetNull()
 {
     var l = new DynamicLoader();
     l.Dynamics((DataSet)null);
 }
        public async Task DataTableDynamics()
        {
            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.Dynamics(ds.Tables[0]);

                Assert.IsNotNull(objs);

                var i = 0;
                foreach (var obj in objs)
                {
                    Assert.AreEqual(i, obj.Identifier);
                    i++;
                }
            }
        }