Example #1
0
        public void TestRulesLogicalExecutionLocation()
        {
            LocationBusinessBase item = LocationBusinessBase.GetLocationBusinessBase();

            Assert.AreEqual(item.Rule, Csla.ApplicationContext.LogicalExecutionLocations.Server.ToString(), "Should be server");

            item.Data = "random";
            Assert.AreEqual(item.Rule, Csla.ApplicationContext.LogicalExecutionLocations.Client.ToString(), "Should be client");
        }
Example #2
0
        public void TestLogicalExecutionLocation()
        {
            Assert.AreEqual(Csla.ApplicationContext.LogicalExecutionLocations.Client, Csla.ApplicationContext.LogicalExecutionLocation, "Should be client");

            LocationBusinessBase item = LocationBusinessBase.GetLocationBusinessBase();

            Assert.AreEqual(item.Data, Csla.ApplicationContext.LogicalExecutionLocations.Server.ToString(), "Should be server");
            Assert.AreEqual(item.NestedData, Csla.ApplicationContext.LogicalExecutionLocations.Server.ToString(), "Nested should be server");

            Assert.AreEqual(Csla.ApplicationContext.LogicalExecutionLocations.Client, Csla.ApplicationContext.LogicalExecutionLocation, "Should be client");
        }
        public void TestRulesLogicalExecutionLocation()
        {
            IDataPortal <LocationBusinessBase> dataPortal = _testDIContext.CreateDataPortal <LocationBusinessBase>();

#pragma warning disable CS0436 // Type conflicts with imported type
            LocationBusinessBase item = LocationBusinessBase.GetLocationBusinessBase(dataPortal);
#pragma warning restore CS0436 // Type conflicts with imported type

            Assert.AreEqual(Csla.ApplicationContext.LogicalExecutionLocations.Server.ToString(), item.Rule, "Should be server");

            item.Data = "random";
            Assert.AreEqual(Csla.ApplicationContext.LogicalExecutionLocations.Client.ToString(), item.Rule, "Should be client");
        }
        public void TestLogicalExecutionLocation()
        {
            Assert.AreEqual(Csla.ApplicationContext.LogicalExecutionLocations.Client, Csla.ApplicationContext.LogicalExecutionLocation, "Should be client");

#pragma warning disable CS0436 // Type conflicts with imported type
#pragma warning disable CS0436 // Type conflicts with imported type
            LocationBusinessBase item = LocationBusinessBase.GetLocationBusinessBase();
#pragma warning restore CS0436 // Type conflicts with imported type
#pragma warning restore CS0436 // Type conflicts with imported type
            Assert.AreEqual(item.Data, Csla.ApplicationContext.LogicalExecutionLocations.Server.ToString(), "Should be server");
            Assert.AreEqual(item.NestedData, Csla.ApplicationContext.LogicalExecutionLocations.Server.ToString(), "Nested should be server");

            Assert.AreEqual(Csla.ApplicationContext.LogicalExecutionLocations.Client, Csla.ApplicationContext.LogicalExecutionLocation, "Should be client");
        }
Example #5
0
        public void TestRulesLogicalExecutionLocation()
        {
            var context = GetContext();

            LocationBusinessBase item;

            LocationBusinessBase.GetLocationBusinessBase((o, e) =>
            {
                item = e.Object;
                context.Assert.AreEqual(item.Data, Csla.ApplicationContext.LogicalExecutionLocations.Server.ToString(), "Should be server");

                item.Data = "random";
                context.Assert.AreEqual(item.Rule, Csla.ApplicationContext.LogicalExecutionLocations.Client.ToString(), "Should be client");

                context.Assert.Success();
            });

            context.Complete();
        }