Summary

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

Metrics

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

File(s)

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

#LineLine coverage
 1using Microsoft.Crm.Sdk.Messages;
 2using Microsoft.Xrm.Sdk;
 3using System;
 4
 5namespace FakeXrmEasy.FakeMessageExecutors
 6{
 7    public class RetrievePrincipalAccessRequestExecutor : IFakeMessageExecutor
 8    {
 9        public bool CanExecute(OrganizationRequest request)
 9610        {
 9611            return request is RetrievePrincipalAccessRequest;
 9612        }
 13
 14        public OrganizationResponse Execute(OrganizationRequest request, XrmFakedContext ctx)
 9615        {
 9616            RetrievePrincipalAccessRequest req = (RetrievePrincipalAccessRequest)request;
 9617            return ctx.AccessRightsRepository.RetrievePrincipalAccess(req.Target, req.Principal);
 9618        }
 19
 20        public Type GetResponsibleRequestType()
 426421        {
 426422            return typeof(RetrievePrincipalAccessRequest);
 426423        }
 24    }
 25}