Summary

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

Metrics

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

File(s)

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

#LineLine coverage
 1using Microsoft.Xrm.Sdk;
 2using Microsoft.Xrm.Sdk.Messages;
 3using System;
 4
 5namespace FakeXrmEasy.FakeMessageExecutors
 6{
 7    public class UpdateRequestExecutor : IFakeMessageExecutor
 8    {
 9        public bool CanExecute(OrganizationRequest request)
 2410        {
 2411            return request is UpdateRequest;
 2412        }
 13
 14        public OrganizationResponse Execute(OrganizationRequest request, XrmFakedContext ctx)
 2415        {
 2416            var updateRequest = (UpdateRequest)request;
 17
 2418            var target = (Entity)request.Parameters["Target"];
 19
 2420            var service = ctx.GetOrganizationService();
 2421            service.Update(target);
 22
 1823            return new UpdateResponse();
 1824        }
 25
 26        public Type GetResponsibleRequestType()
 426427        {
 426428            return typeof(UpdateRequest);
 426429        }
 30    }
 31}