Пример #1
0
        public void Test_GetDirectReferences()
        {
            System.Console.Out.WriteLine("GetDirectReferences");
            IEnumerator enumerator = arm.GetDirectReferences().GetEnumerator();
            int         index      = 0;

            while (enumerator.MoveNext())
            {
                Account account = (Account)enumerator.Current;
                Assert.IsTrue(accounts.Contains(account));
                index++;
            }
            Assert.AreEqual(accounts.Count, index);
        }
Пример #2
0
        public DataTable GetAccountReferences()
        {
            DataTable  table = new DataTable();
            DataColumn column;

            column            = new DataColumn();
            column.DataType   = Type.GetType("System.String");
            column.ColumnName = "reference";
            table.Columns.Add(column);

            column            = new DataColumn();
            column.DataType   = Type.GetType("System.String");
            column.ColumnName = "name";
            table.Columns.Add(column);
            foreach (Account account in arm.GetDirectReferences())
            {
                DataRow row = table.NewRow();
                row["reference"] = arm.GetIndirectReference(account);
                row["name"]      = account.Name;
                table.Rows.Add(row);
            }
            return(table);
        }