Summary

Class:FakeXrmEasy.FakeMessageExecutors.RevokeAccessRequestExecutor
Assembly:FakeXrmEasy
File(s):F:\Git\fake-xrm-easy\FakeXrmEasy.Shared\FakeMessageExecutors\RevokeAccessRequestExecutor.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\RevokeAccessRequestExecutor.cs

#LineLine coverage
 1using Microsoft.Crm.Sdk.Messages;
 2using Microsoft.Xrm.Sdk;
 3using System;
 4
 5namespace FakeXrmEasy.FakeMessageExecutors
 6{
 7    public class RevokeAccessRequestExecutor : IFakeMessageExecutor
 8    {
 9        public bool CanExecute(OrganizationRequest request)
 1210        {
 1211            return request is RevokeAccessRequest;
 1212        }
 13
 14        public OrganizationResponse Execute(OrganizationRequest request, XrmFakedContext ctx)
 1215        {
 1216            RevokeAccessRequest req = (RevokeAccessRequest)request;
 1217            ctx.AccessRightsRepository.RevokeAccessTo(req.Target, req.Revokee);
 1218            return new RevokeAccessResponse();
 1219        }
 20
 21        public Type GetResponsibleRequestType()
 426422        {
 426423            return typeof(RevokeAccessRequest);
 426424        }
 25    }
 26}