Summary

Class:FakeXrmEasy.Extensions.EntityReferenceExtensions
Assembly:FakeXrmEasy
File(s):F:\Git\fake-xrm-easy\FakeXrmEasy.Shared\Extensions\EntityReferenceExtensions.cs
Covered lines:4
Uncovered lines:3
Coverable lines:7
Total lines:24
Line coverage:57.1%
Branch coverage:50%

Metrics

MethodCyclomatic ComplexitySequence CoverageBranch Coverage
HasKeyAttributes(...)266.6766.67

File(s)

F:\Git\fake-xrm-easy\FakeXrmEasy.Shared\Extensions\EntityReferenceExtensions.cs

#LineLine coverage
 1using Microsoft.Xrm.Sdk;
 2using System;
 3using System.Collections.Generic;
 4using System.Text;
 5
 6namespace FakeXrmEasy.Extensions
 7{
 8    public static class EntityReferenceExtensions
 9    {
 10        public static bool HasKeyAttributes(this EntityReference er)
 5111        {
 5112             if(er == null)
 013            {
 014                return false;
 15            }
 16
 17#if !FAKE_XRM_EASY && !FAKE_XRM_EASY_2013 && !FAKE_XRM_EASY_2015
 5118            return er.KeyAttributes.Count > 0;
 19#else
 020            return false;
 21#endif
 5122        }
 23    }
 24}