< Summary

Class:Mklinker.ConfigLink
Assembly:Mklinker
File(s):/home/travis/build/rubenchristoffer/Mklinker/Mklinker/ConfigLink.cs
Covered lines:10
Uncovered lines:1
Coverable lines:11
Total lines:40
Line coverage:90.9% (10 of 11)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity NPath complexity Sequence coverage Branch coverage
.ctor()100%100%
.ctor(...)10100%100%
ToString()10100%100%

File(s)

/home/travis/build/rubenchristoffer/Mklinker/Mklinker/ConfigLink.cs

#LineLine coverage
 1using System;
 2using System.Xml.Serialization;
 3
 4namespace Mklinker {
 5
 6  public class ConfigLink {
 7
 8    [XmlElement("SourcePath")]
 9    public string sourcePath;
 10
 11    [XmlElement("TargetPath")]
 12    public string targetPath;
 13
 14    [XmlAttribute ("Type")]
 15    public LinkType linkType;
 16
 17    public enum LinkType {
 18      Default,
 19      Junction,
 20      Symbolic,
 21      Hard
 22    }
 23
 024    public ConfigLink () {}
 25
 39626    public ConfigLink(string sourcePath, string targetPath, LinkType linkType) {
 19827      this.sourcePath = sourcePath;
 19828      this.targetPath = targetPath;
 19829      this.linkType = linkType;
 19830    }
 31
 632    public override string ToString() {
 633      return $"{ linkType.ToString() } link:\n" +
 634        $"\t- Source: { sourcePath }\n" +
 635        $"\t- Target: { targetPath }";
 636    }
 37
 38  }
 39
 40}