< Summary

Information
Class: Test.TestClass2
Assembly: Sample
File(s): C:\temp\TestClass2.cs
Line coverage
63%
Covered lines: 24
Uncovered lines: 14
Coverable lines: 38
Total lines: 85
Line coverage: 63.1%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
Method coverage
60%
Covered methods: 6
Total methods: 10
Method coverage: 60%

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
.ctor()0%2100%
.ctor(...)100%110100%
ExecutedMethod()100%110100%
UnExecutedMethod()0%2100%
SampleFunction(...)66.67%552100%
DoSomething(...)0%2100%

File(s)

C:\temp\TestClass2.cs

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using System.Linq;
 4
 5namespace Test
 6{
 7    class TestClass2
 8    {
 9        private string name;
 10
 211        private Dictionary<string, int> dict = new Dictionary<string, int>();
 12
 313        public string ExecutedProperty { get; set; }
 14
 015        public string UnExecutedProperty { get; set; }
 16
 017        public TestClass2()
 018        {
 019            this.name = "Nobody";
 020            this.ExecutedProperty = "Nobody";
 021        }
 22
 223        public TestClass2(string name)
 224        {
 225            this.name = name;
 226            this.ExecutedProperty = name + name;
 227        }
 28
 29        public void ExecutedMethod()
 130        {
 131            Console.WriteLine(this.name);
 132            Console.WriteLine(this.ExecutedProperty);
 133        }
 34
 35        public void UnExecutedMethod()
 036        {
 037            Console.WriteLine(this.name);
 038            Console.WriteLine(this.ExecutedProperty);
 039        }
 40
 41        public void SampleFunction(string city)
 142        {
 143            int[] values = new int[] { 0, 1, 2, 3 };
 44
 545            var doubled = values.Select(i => i * 2);
 46
 1147            foreach (var item in doubled)
 448            {
 449                Console.WriteLine(item);
 450            }
 51
 152            string[] cities = new string[] { "Berlin", "Munich", "Paris" };
 53
 454            if (cities.SingleOrDefault(c => c.Equals(city, StringComparison.OrdinalIgnoreCase)) != null)
 155            {
 156                Console.WriteLine("Found " + city);
 157            }
 158        }
 59
 60        public string DoSomething(string value,
 61            string[] stringArray,
 62            Guid id,
 63            IEnumerable<string> stringEnumerable,
 64            IList<string> stringList,
 65            decimal dec,
 66            int i,
 67            Dictionary<string, int> dict,
 68            out int g,
 69            float fff,
 70            double dou,
 71            bool bo,
 72            byte by,
 73            char ch,
 74            object o,
 75            sbyte sby,
 76            short sh,
 77            uint ui,
 78            ulong ul,
 79            ushort usho)
 080        {
 081            g = 0;
 082            return null;
 083        }
 84    }
 85}