Ejemplo n.º 1
0
            public void Setup()
            {
                Root = new TestRoot();
                var rule = new OnlyForUS(AuthorizationActions.WriteProperty, TestRoot.NameProperty, TestRoot.CountryProperty);

                InitializeTest(rule, Root, typeof(TestRoot));
            }
Ejemplo n.º 2
0
            public void Setup()
            {
                var services = new ServiceCollection();

                services.AddCsla();
                var provider           = services.BuildServiceProvider();
                var applicationContext = provider.GetRequiredService <ApplicationContext>();

                var portal = applicationContext.GetRequiredService <IDataPortal <TestRoot> >();

                Root = portal.Create();
                var rule = new OnlyForUS(AuthorizationActions.WriteProperty, TestRoot.NameProperty, TestRoot.CountryProperty);

                InitializeTest(rule, Root, typeof(TestRoot));
            }