Summary

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

Metrics

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

File(s)

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

#LineLine coverage
 1using Microsoft.Crm.Sdk.Messages;
 2using Microsoft.Xrm.Sdk;
 3using System;
 4
 5namespace FakeXrmEasy.FakeMessageExecutors
 6{
 7    public class PublishXmlRequestExecutor : IFakeMessageExecutor
 8    {
 9        public bool CanExecute(OrganizationRequest request)
 1210        {
 1211            return request is PublishXmlRequest;
 1212        }
 13
 14        public OrganizationResponse Execute(OrganizationRequest request, XrmFakedContext ctx)
 1215        {
 1216            var req = request as PublishXmlRequest;
 17
 1218             if (string.IsNullOrWhiteSpace(req.ParameterXml))
 619            {
 620                throw new Exception(string.Format("ParameterXml property must not be blank."));
 21            }
 622            return new PublishXmlResponse()
 623            {
 624            };
 625        }
 26
 27        public Type GetResponsibleRequestType()
 426428        {
 426429            return typeof(PublishXmlRequest);
 426430        }
 31    }
 32}