public void When_execute_is_called_all_requests_are_executed()
        {
            var context = new XrmFakedContext();
            var executor = new ExecuteTransactionExecutor();
            var req = new ExecuteTransactionRequest()
            {
                Requests = new OrganizationRequestCollection()
                {
                    new CreateRequest() { Target = new Entity("contact") },
                    new CreateRequest() { Target = new Entity("contact") },
                    new CreateRequest() { Target = new Entity("contact") }
                }
            };

            var response = executor.Execute(req, context) as ExecuteTransactionResponse;
            var contacts = context.CreateQuery("contact").ToList();
            Assert.Equal(0, response.Responses.Count);
            Assert.Equal(3, contacts.Count);
        }
 public void When_can_execute_is_called_with_an_invalid_request_result_is_false()
 {
     var executor = new ExecuteTransactionExecutor();
     var anotherRequest = new RetrieveMultipleRequest();
     Assert.False(executor.CanExecute(anotherRequest));
 }