Adding a convention test to detect whether a model has a constructor exposing all properties (#1798)

* Added a convention test to detect a model constructor exposing all properties

* add ctors to classes where they are missing

* rename ctor parameters that dont match properties

* add missing parameters to existing ctors

* add specific PunchCard ctor to allow mocking, and update test to resolve call ambiguity

* Added base class properties to the convention test

Added member exclusion attribute

* Updated newly offending classes

2 excludes and 2 ctors

* rename exclusion attribute to be a bit shorter
This commit is contained in:
tasadar2
2018-04-25 07:03:13 -04:00
committed by Ryan Gribble
parent f9bf9b2347
commit 3345f76fc9
34 changed files with 232 additions and 27 deletions
@@ -165,6 +165,13 @@ namespace Octokit
{
public BranchProtectionRequiredReviews() { }
public BranchProtectionRequiredReviews(BranchProtectionRequiredReviewsDismissalRestrictions dismissalRestrictions, bool dismissStaleReviews, bool requireCodeOwnerReviews)
{
DismissalRestrictions = dismissalRestrictions;
DismissStaleReviews = dismissStaleReviews;
RequireCodeOwnerReviews = requireCodeOwnerReviews;
}
/// <summary>
/// Specify which users and teams can dismiss pull request reviews.
/// </summary>