Add GuildPermissions and ChannelPermissions Unit Tests (#873)

* initial commit

* Add GuildPermission tests for constructor and modify parameters

* Fixed GuildPermission All value. Previous value had an additional digit that would still resolve to correct permission flags, but raw value would be incorrect. This matches the result of the sum of all GuildPermission flags

* Added raw value check to guild permission modify tests

* Add ChannelPermissions tests
This commit is contained in:
Chris Johnston
2017-11-20 11:54:10 -08:00
committed by Christopher F
parent 9979a027d5
commit cf8de42b62
3 changed files with 629 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ namespace Discord
/// <summary> Gets a GuildPermissions that grants all guild permissions for webhook users. </summary>
public static readonly GuildPermissions Webhook = new GuildPermissions(0b00000_0000000_0001101100000_000000);
/// <summary> Gets a GuildPermissions that grants all guild permissions. </summary>
public static readonly GuildPermissions All = new GuildPermissions(0b11111_1111110_11111111110011_111111);
public static readonly GuildPermissions All = new GuildPermissions(0b11111_1111110_1111111110011_111111);
/// <summary> Gets a packed value representing all the permissions in this GuildPermissions. </summary>
public ulong RawValue { get; }