public void op_Shard_IIdentifyShard() { var identifier = new ShardByValue("one"); var sheet = new DerivedDataSheet(); foreach (var shard in sheet.Shard(identifier)) { Assert.Equal("1", shard.Title); } }
public void op_ToDataTable() { var sheet = new DerivedDataSheet(); var table = sheet.ToDataTable(); Assert.Equal(string.Empty, table.TableName); foreach (DataRow row in table.Rows) { Assert.Equal("1", row.Field <string>("one")); } }
public void opIndexer_int() { using (var temp = new TempFile()) { var expected = new DerivedDataSheet(); var data = new DerivedDataFile(temp.Info); data.Sheets.Add(expected); var actual = data[0]; Assert.Same(expected, actual); } }
public void op_ToDataTable_string() { const string name = "Example"; var sheet = new DerivedDataSheet(); var table = sheet.ToDataTable(name); Assert.Equal(name, table.TableName); foreach (DataRow row in table.Rows) { Assert.Equal("1", row.Field <string>("one")); } }
public void opIndexer_string() { using (var temp = new TempFile()) { const string title = "Example"; var expected = new DerivedDataSheet { Title = title }; var data = new DerivedDataFile(temp.Info); data.Sheets.Add(expected); var actual = data[title]; Assert.Same(expected, actual); } }