You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.179
Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
This commit is contained in:
committed by
Jo Shields
parent
aa7da660d6
commit
c042cd0c52
@@ -31,6 +31,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace MonoTests.System.Data
|
||||
@@ -72,6 +73,22 @@ namespace MonoTests.System.Data
|
||||
dt.AsEnumerable ().CopyToDataTable<DataRow> (dst, LoadOption.PreserveChanges);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AsEnumerable ()
|
||||
{
|
||||
DataSet ds = new DataSet ();
|
||||
ds.ReadXml ("Test/System.Data/testdataset1.xml");
|
||||
DataTable dt = ds.Tables [0];
|
||||
Assert.AreEqual ("ScoreList", dt.TableName, "TableName");
|
||||
var dv = dt.AsEnumerable ();
|
||||
Assert.AreEqual (4, dv.Count (), "#0");
|
||||
var i = dv.GetEnumerator ();
|
||||
Assert.IsTrue (i.MoveNext (), "#1");
|
||||
Assert.AreEqual (1, i.Current ["ID"], "#2");
|
||||
Assert.IsTrue (i.MoveNext (), "#3");
|
||||
Assert.AreEqual (2, i.Current ["ID"], "#4");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AsDataView ()
|
||||
{
|
||||
|
Reference in New Issue
Block a user