Summary

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

Metrics

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

File(s)

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

#LineLine coverage
 1using Microsoft.Crm.Sdk.Messages;
 2using Microsoft.Xrm.Sdk;
 3using System;
 4
 5namespace FakeXrmEasy.FakeMessageExecutors
 6{
 7    public class GrantAccessRequestExecutor : IFakeMessageExecutor
 8    {
 9        public bool CanExecute(OrganizationRequest request)
 10810        {
 10811            return request is GrantAccessRequest;
 10812        }
 13
 14        public OrganizationResponse Execute(OrganizationRequest request, XrmFakedContext ctx)
 10815        {
 10816            GrantAccessRequest req = (GrantAccessRequest)request;
 10817            ctx.AccessRightsRepository.GrantAccessTo(req.Target, req.PrincipalAccess);
 10818            return new GrantAccessResponse();
 10819        }
 20
 21        public Type GetResponsibleRequestType()
 426422        {
 426423            return typeof(GrantAccessRequest);
 426424        }
 25    }
 26}