Update Guild and Message Models (#1165)
* Add ExplicitContentFilter property to Guild * re-order properties to match order listed on api docs * re-order SystemChannelId to match api docs * Implement ApplicationId in Guild model * Add ExplicitContentFilter property to Guild * re-order properties to match order listed on api docs * re-order SystemChannelId to match api docs * Implement ApplicationId in Guild model * Improve xmldoc for IGuild ExplicitContentFilter * Update xmldoc * docs "Id" -> "ID" * rename Test.GuildPermissions to a more general Test.Guilds * Add ExplicitContentFilter to GuildProperties * Add a test for ExplicitContentFilterLevel modification behavior * Implement ModifyAsync behavior * simplify ExplicitContentFilter test * Add RestGuild ApplicationId inheritdoc * Implement message Activity and Application model update * RestMessage Application and Activity implementation * add ToString to MessageApplication * Add IconUrl property to MessageApplication * clean up whitespace * another excessive whitespace removal
This commit is contained in:
committed by
Christopher F
parent
10f67a8098
commit
d30d12246d
@@ -5,8 +5,25 @@ using Xunit;
|
||||
|
||||
namespace Discord
|
||||
{
|
||||
public class GuidPermissionsTests
|
||||
public partial class Tests
|
||||
{
|
||||
/// <summary>
|
||||
/// Tests the behavior of modifying the ExplicitContentFilter property of a Guild.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task TestExplicitContentFilter()
|
||||
{
|
||||
foreach (var level in Enum.GetValues(typeof(ExplicitContentFilterLevel)))
|
||||
{
|
||||
await _guild.ModifyAsync(x => x.ExplicitContentFilter = (ExplicitContentFilterLevel)level);
|
||||
await _guild.UpdateAsync();
|
||||
Assert.Equal(level, _guild.ExplicitContentFilter);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tests the behavior of the GuildPermissions class.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public Task TestGuildPermission()
|
||||
{
|
||||
Reference in New Issue
Block a user