예제 #1
0
 public static void ClassInit(TestContext context)
 {
     app = new CremaBootstrapper();
     app.Initialize(context, nameof(ITableRow_DispatcherTest));
     cremaHost = app.GetService(typeof(ICremaHost)) as ICremaHost;
     cremaHost.Dispatcher.Invoke(() =>
     {
         authentication = cremaHost.Start();
         dataBase       = cremaHost.DataBases.Random();
         dataBase.Load(authentication);
         dataBase.Enter(authentication);
         dataBase.Initialize(authentication);
         content = dataBase.TableContext.Tables.Random(item => item.Parent == null).Content;
         content.BeginEdit(authentication);
         content.EnterEdit(authentication);
         if (content.Count == 0)
         {
             content.AddRandomRows(authentication);
         }
         row = content.Random();
     });
 }