Exemple #1
0
 public static void ClassInit(TestContext context)
 {
     app = new CremaBootstrapper();
     app.Initialize(context, nameof(CremaHost_AssemblyInitializer));
     cremaHost      = app.GetService(typeof(ICremaHost)) as ICremaHost;
     authentication = cremaHost.Dispatcher.Invoke(() => cremaHost.Start());
 }
 public static void ClassInit(TestContext context)
 {
     app = new CremaBootstrapper();
     app.Initialize(context, nameof(IDataBase_DispatcherTest));
     cremaHost = app.GetService(typeof(ICremaHost)) as ICremaHost;
     cremaHost.Dispatcher.Invoke(() =>
     {
         authentication = cremaHost.Start();
         dataBase       = cremaHost.DataBases.Random();
     });
 }
 public static void ClassInit(TestContext context)
 {
     app = new CremaBootstrapper();
     app.Initialize(context, nameof(IDomainCollection_DispatcherTest));
     cremaHost = app.GetService(typeof(ICremaHost)) as ICremaHost;
     cremaHost.Dispatcher.Invoke(() =>
     {
         authentication = cremaHost.Start();
         domains        = cremaHost.GetService(typeof(IDomainCollection)) as IDomainCollection;
     });
 }
 public static void ClassInit(TestContext context)
 {
     app = new CremaBootstrapper();
     app.Initialize(context, nameof(IUserItem_DispatcherTest));
     cremaHost = app.GetService(typeof(ICremaHost)) as ICremaHost;
     cremaHost.Dispatcher.Invoke(() =>
     {
         authentication = cremaHost.Start();
         userContext    = cremaHost.GetService(typeof(IUserContext)) as IUserContext;
     });
     userItem = userContext.Dispatcher.Invoke(() => userContext.Random());
 }
Exemple #5
0
 public static void ClassInit(TestContext context)
 {
     app = new CremaBootstrapper();
     app.Initialize(context, nameof(IDataBase_Deleted_DispatcherTest));
     cremaHost = app.GetService(typeof(ICremaHost)) as ICremaHost;
     cremaHost.Dispatcher.Invoke(() =>
     {
         authentication = cremaHost.Start();
         dataBase       = cremaHost.DataBases.AddNewDataBase(authentication, RandomUtility.NextIdentifier(), RandomUtility.NextString());
         dataBase.Delete(authentication);
     });
 }
 public static void ClassInit(TestContext context)
 {
     app = new CremaBootstrapper();
     app.Initialize(context, nameof(ITableCategoryCollection_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);
         categories = dataBase.TableContext.Categories;
     });
 }
 public static void ClassInit(TestContext context)
 {
     app = new CremaBootstrapper();
     app.Initialize(context, nameof(ITableContent_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;
     });
 }
 public static void ClassInit(TestContext context)
 {
     app = new CremaBootstrapper();
     app.Initialize(context, nameof(ITypeCollection_Deleted_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.TypeContext.AddRandomItems(authentication);
         types = dataBase.TypeContext.Types;
         dataBase.Leave(authentication);
         dataBase.Unload(authentication);
     });
 }
 public static void ClassInit(TestContext context)
 {
     app = new CremaBootstrapper();
     app.Initialize(context, nameof(ITypeTemplate_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.TypeContext.AddRandomItems(authentication);
         template = dataBase.TypeContext.Types.Random().Template;
         template.BeginEdit(authentication);
         member = template.AddNew(authentication);
     });
 }
Exemple #10
0
 public static void ClassInit(TestContext context)
 {
     app = new CremaBootstrapper();
     app.Initialize(context, nameof(IDomain_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.TypeContext.AddRandomItems(authentication);
         dataBase.TableContext.AddRandomItems(authentication);
         table = dataBase.TableContext.Tables.Random(item => item.TemplatedParent == null);
         table.Template.BeginEdit(authentication);
         domain = table.Template.Domain;
     });
 }
Exemple #11
0
 public static void ClassInit(TestContext context)
 {
     app = new CremaBootstrapper();
     app.Initialize(context, nameof(ITableColumn_Deleted_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);
         template = dataBase.TableContext.Tables.Random(item => item.TemplatedParent == null).Template;
         template.BeginEdit(authentication);
         column = template.Random();
         dataBase.Leave(authentication);
         dataBase.Unload(authentication);
     });
 }
 public static void ClassInit(TestContext context)
 {
     app = new CremaBootstrapper();
     app.Initialize(context, nameof(ITableRow_Deleted_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();
         dataBase.Leave(authentication);
         dataBase.Unload(authentication);
     });
 }