Summary

Class:FakeXrmEasy.FakeMessageExecutors.ExecuteTransactionExecutor
Assembly:FakeXrmEasy
File(s):F:\Git\fake-xrm-easy\FakeXrmEasy.Shared\FakeMessageExecutors\ExecuteTransactionExecutor.cs
Covered lines:20
Uncovered lines:0
Coverable lines:20
Total lines:41
Line coverage:100%
Branch coverage:100%

Metrics

MethodCyclomatic ComplexitySequence CoverageBranch Coverage
CanExecute(...)1100100
Execute(...)5100100
GetResponsibleRequestType()1100100

File(s)

F:\Git\fake-xrm-easy\FakeXrmEasy.Shared\FakeMessageExecutors\ExecuteTransactionExecutor.cs

#LineLine coverage
 1#if FAKE_XRM_EASY_2016 || FAKE_XRM_EASY_365 || FAKE_XRM_EASY_9
 2
 3using Microsoft.Xrm.Sdk;
 4using Microsoft.Xrm.Sdk.Messages;
 5using System;
 6
 7namespace FakeXrmEasy.FakeMessageExecutors
 8{
 9    public class ExecuteTransactionExecutor : IFakeMessageExecutor
 10    {
 11        public bool CanExecute(OrganizationRequest request)
 312        {
 313            return request is ExecuteTransactionRequest;
 314        }
 15
 16        public OrganizationResponse Execute(OrganizationRequest request, XrmFakedContext ctx)
 617        {
 618            var executeTransactionRequest = (ExecuteTransactionRequest)request;
 619            var response = new ExecuteTransactionResponse { ["Responses"] = new OrganizationResponseCollection() };
 20
 621            var service = ctx.GetFakedOrganizationService();
 22
 5423            foreach (var r in executeTransactionRequest.Requests)
 1824            {
 1825                var result = service.Execute(r);
 26
 1827                 if (executeTransactionRequest.ReturnResponses.HasValue && executeTransactionRequest.ReturnResponses.Valu
 928                {
 929                    response.Responses.Add(result);
 930                }
 1831            }
 632            return response;
 633        }
 34
 35        public Type GetResponsibleRequestType()
 219836        {
 219837            return typeof(ExecuteTransactionRequest);
 219838        }
 39    }
 40}
 41#endif