Пример #1
0
 public void OrderByDefaultsToPrimaryKeyAscending()
 {
     var qry = new Query(_table);
     var sort = qry.Sorting.ToArray();
     Assert.AreEqual(1, sort.Length);
     Assert.AreSame(_table.Controller.Id, sort[0].Column);
     Assert.AreEqual(SortDirection.Ascending, sort[0].Direction);
 }
Пример #2
0
 public void SelectDefaultsToAllColumns()
 {
     var qry = new Query(_table);
     var parts = qry.Participants.Select(c => c.Column).ToArray();
     Assert.AreEqual(3, parts.Length);
     Assert.Contains(_table.Controller.Id, parts);
     Assert.Contains(_table.Controller.Name, parts);
     Assert.Contains(_table.Controller.SupplierId, parts);
 }