diff options
author | Konstantin Triger <kostat@mono-cvs.ximian.com> | 2007-03-05 13:55:06 +0300 |
---|---|---|
committer | Konstantin Triger <kostat@mono-cvs.ximian.com> | 2007-03-05 13:55:06 +0300 |
commit | 73fff7caf9334335f1edc049540d5fa8fe333833 (patch) | |
tree | 3ab7ffb7bc57bbc3a080e301b4847fc169f55d83 /mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.jvm | |
parent | a3829e9f80c56307b7b8e116ac408be52f991aa5 (diff) |
Implement CommandBehavior.SingleRow
svn path=/trunk/mcs/; revision=73704
Diffstat (limited to 'mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.jvm')
-rw-r--r-- | mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.jvm/OleDbDataReader/OleDbDataReader_Read.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.jvm/OleDbDataReader/OleDbDataReader_Read.cs b/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.jvm/OleDbDataReader/OleDbDataReader_Read.cs index f6a8037f700..1d8296954ec 100644 --- a/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.jvm/OleDbDataReader/OleDbDataReader_Read.cs +++ b/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.jvm/OleDbDataReader/OleDbDataReader_Read.cs @@ -78,6 +78,26 @@ namespace MonoTests.System.Data.OleDb } [Test] + public void CommandBehaviorSingleRow () + { + Exception exp = null; + + cmd.CommandText = "Select * From Employees"; + OleDbDataReader rdr = cmd.ExecuteReader(CommandBehavior.SingleRow); + + try + { + BeginCase ("CommandBehaviorSingleRow"); + int i = 0; + while (rdr.Read ()) + i++; + Compare(i, 1); + } + catch(Exception ex){exp = ex;} + finally{EndCase(exp); exp = null;} + } + + [Test] public void run() { Exception exp = null; |