Example #1
0
        public void ExecuteCommand_called_without_UserState_results_in_UserState_defaulted_to_Null_server()
        {
            var context = GetContext();
            var command = new CommandObject();

            command.ExecuteServerCodeAsunch((o1, e1) =>
            {
                context.Assert.IsNull(e1.Error);
                context.Assert.AreEqual("Executed", e1.Object.AProperty);
                context.Assert.IsNull(e1.UserState);
                context.Assert.Success();
            });
            context.Complete();
        }
Example #2
0
        public void ExecuteCommand_called_with_UserState_results_in_UserState_set_on_server()
        {
            var    context   = GetContext();
            object userState = "state";
            var    command   = new CommandObject();

            command.ExecuteServerCodeAsunch((o1, e1) =>
            {
                context.Assert.IsNull(e1.Error);
                context.Assert.AreEqual("Executed", e1.Object.AProperty);
                context.Assert.AreEqual(userState, e1.UserState);
                context.Assert.Success();
            }, userState);
            context.Complete();
        }
 public void ExecuteCommand_called_without_UserState_results_in_UserState_defaulted_to_Null_server()
 {
   var context = GetContext();
   var command = new CommandObject();
   command.ExecuteServerCodeAsunch((o1, e1) =>
                                     {
                                       context.Assert.IsNull(e1.Error);
                                       context.Assert.AreEqual("Executed", e1.Object.AProperty);
                                       context.Assert.IsNull(e1.UserState);
                                       context.Assert.Success();
                                     });
   context.Complete();
 }
 public void ExecuteCommand_called_with_UserState_results_in_UserState_set_on_server()
 {
   var context = GetContext();
   object userState = "state";
   var command = new CommandObject();
   command.ExecuteServerCodeAsunch((o1, e1) =>
                                     {
                                       context.Assert.IsNull(e1.Error);
                                       context.Assert.AreEqual("Executed", e1.Object.AProperty);
                                       context.Assert.AreEqual(userState, e1.UserState);
                                       context.Assert.Success();
                                     }, userState);
   context.Complete();
 }