Skip to content
This repository has been archived by the owner on Dec 28, 2017. It is now read-only.

Commit

Permalink
Call base.GetPreferredCommentFormat to have better test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed Apr 3, 2017
1 parent 1c41185 commit 64b200d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Cake.Prca.Tests/FakePullRequestSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class FakePullRequestSystem : PullRequestSystem
public FakePullRequestSystem(ICakeLog log)
: base(log)
{
this.Initialize();
}

public FakePullRequestSystem(
Expand All @@ -35,6 +36,8 @@ public FakePullRequestSystem(

// ReSharper disable once PossibleMultipleEnumeration
this.modifiedFiles.AddRange(modifiedFiles);

this.Initialize();
}

public new ICakeLog Log => base.Log;
Expand All @@ -45,7 +48,7 @@ public FakePullRequestSystem(

public IEnumerable<ICodeAnalysisIssue> PostedIssues => this.postedIssues;

public PrcaCommentFormat CommentFormat { get; set; } = PrcaCommentFormat.PlainText;
public PrcaCommentFormat CommentFormat { get; set; }

public override PrcaCommentFormat GetPreferredCommentFormat()
{
Expand Down Expand Up @@ -79,5 +82,10 @@ protected override void InternalPostDiscussionThreads(IEnumerable<ICodeAnalysisI
// ReSharper disable once PossibleMultipleEnumeration
this.postedIssues.AddRange(issues);
}

private void Initialize()
{
this.CommentFormat = base.GetPreferredCommentFormat();
}
}
}

0 comments on commit 64b200d

Please sign in to comment.