Beispiel #1
0
        public void DataPortalExecute_OnCommandObjectWithLocalProxy_CallsFactoryExecute()
        {
            Csla.ApplicationContext.GlobalContext.Clear();
            Csla.Server.FactoryDataPortal.FactoryLoader = null;
            var test = CommandObject.Execute();

            // return value is set in Execute method in CommandObjectFactory
            Assert.IsTrue(test);
        }
Beispiel #2
0
        public void DataPortalExecute_OnCommandObjectWithLocalProxy_CallsFactoryExecute()
        {
            TestDIContext testDIContext            = TestDIContextFactory.CreateDefaultContext();
            IDataPortal <CommandObject> dataPortal = testDIContext.CreateDataPortal <CommandObject>();

            TestResults.Reinitialise();

            var test = CommandObject.Execute(dataPortal);

            // return value is set in Execute method in CommandObjectFactory
            Assert.IsTrue(test);
        }
Beispiel #3
0
 public object Execute(CommandObject command)
 {
     command.Result = true;
     return(command);
 }