public void OrderByGetLabelNone() { using (new SoodaTransaction()) { IEnumerable <ContactType> ce = ContactType.Linq().OrderBy(t => t.GetLabel(false)); CollectionAssert.AreEquivalent(ContactType.GetList(true), ce); } }
public void NoLabel() { using (new SoodaTransaction()) { ContactTypeList types = ContactType.GetList(true); Assert.AreEqual(3, types.Count); Assert.IsNull(types[0].GetLabel(false)); Assert.IsNull(types[1].GetLabel(false)); Assert.IsNull(types[2].GetLabel(false)); } }
public void DoGetListTest() { using (TestSqlDataSource testDataSource = new TestSqlDataSource("default")) { testDataSource.Open(); using (SoodaTransaction tran = new SoodaTransaction()) { tran.RegisterDataSource(testDataSource); ContactTypeList ctl = ContactType.GetList(tran, SoodaWhereClause.Unrestricted, SoodaSnapshotOptions.Default); foreach (ContactType ct in ctl) { Console.Out.WriteLine("ContactType[{0}]", ct.GetPrimaryKeyValue()); } RoleList rl = Role.GetList(tran, SoodaWhereClause.Unrestricted); foreach (Role r in rl) { Console.Out.WriteLine("Role[{0}]", r.GetPrimaryKeyValue()); } tran.Commit(); } } }