Fix ChannelPermissions Modify parameter to be correct default value (#1003)

* fix channel permissions modify parameter to use nullable boolean, correct default value

* Add general tests for the ChannelPermissions.Modify method to test default values

* remove unused cast in tests

* add guildpermission modify no param tests

* Add no-param modify tests for OverwritePermissions

* fix inconsistent parameters in GuildPermissions cstr

* Adjust formatting of methods and cstrs with many parameters

* remove temp file that was included. no idea what that is

* Fix System dependency

I should really stop fixing merge conflicts in the github website.
This commit is contained in:
Chris Johnston
2018-05-26 11:15:09 -07:00
committed by Christopher F
parent f9cbff5e42
commit a06e21261c
6 changed files with 356 additions and 65 deletions

View File

@@ -26,6 +26,18 @@ namespace Discord
// ensure that the raw values match
Assert.Equal((ulong)0, copy.RawValue);
// test modify with no parameters
copy = GuildPermissions.None.Modify();
Assert.Equal(GuildPermissions.None.RawValue, copy.RawValue);
// test modify with no paramters on all permissions
copy = GuildPermissions.All.Modify();
Assert.Equal(GuildPermissions.All.RawValue, copy.RawValue);
// test modify with no paramters on webhook permissions
copy = GuildPermissions.Webhook.Modify();
Assert.Equal(GuildPermissions.Webhook.RawValue, copy.RawValue);
// test GuildPermissions.All
ulong sumOfAllGuildPermissions = 0;
foreach(var v in Enum.GetValues(typeof(GuildPermission)))