-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
75af1ef
commit b1f5b21
Showing
4 changed files
with
188 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
Tests/Remora.Discord.API.Tests/API/Objects/Invites/InviteWithMetadataTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// InviteWithMetadataTests.cs | ||
// | ||
// Author: | ||
// Jarl Gullberg <[email protected]> | ||
// | ||
// Copyright (c) Jarl Gullberg | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU Lesser General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU Lesser General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Lesser General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
// | ||
|
||
using Remora.Discord.API.Abstractions.Objects; | ||
using Remora.Discord.API.Tests.TestBases; | ||
|
||
namespace Remora.Discord.API.Tests.Objects; | ||
|
||
/// <inheritdoc /> | ||
public class InviteWithMetadataTests : ObjectTestBase<IInviteWithMetadata> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="InviteWithMetadataTests"/> class. | ||
/// </summary> | ||
/// <param name="fixture">The test fixture.</param> | ||
public InviteWithMetadataTests(JsonBackedTypeTestFixture fixture) | ||
: base(fixture) | ||
{ | ||
} | ||
} |
70 changes: 70 additions & 0 deletions
70
Tests/Remora.Discord.Tests/Samples/Objects/INVITE_WITH_METADATA/INVITE_WITH_METADATA.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"code": "123456", | ||
"guild": { }, | ||
"channel": { }, | ||
"inviter": { | ||
"username": "none", | ||
"discriminator": "9999", | ||
"id": "999999999999999999", | ||
"avatar": "68b329da9893e34099c7d8ad5cb9c940" | ||
}, | ||
"target_type": 1, | ||
"target_user": { | ||
"username": "none", | ||
"discriminator": "9999", | ||
"id": "999999999999999999", | ||
"avatar": "68b329da9893e34099c7d8ad5cb9c940" | ||
}, | ||
"target_application": { | ||
"id": "999999999999999999", | ||
"name": "none", | ||
"icon": "68b329da9893e34099c7d8ad5cb9c940", | ||
"description": "none", | ||
"bot_public": true, | ||
"bot_require_code_grant": true, | ||
"verify_key": "none", | ||
"team": { | ||
"icon": "68b329da9893e34099c7d8ad5cb9c940", | ||
"id": "999999999999999999", | ||
"members": [ | ||
{ | ||
"membership_state": 2, | ||
"permissions": [ | ||
"*" | ||
], | ||
"team_id": "999999999999999999", | ||
"user": { | ||
"avatar": "68b329da9893e34099c7d8ad5cb9c940", | ||
"discriminator": "9999", | ||
"id": "999999999999999999", | ||
"username": "none" | ||
}, | ||
"role": "read_only" | ||
} | ||
], | ||
"name": "none", | ||
"owner_user_id": "999999999999999999" | ||
} | ||
}, | ||
"approximate_presence_count": 1, | ||
"approximate_member_count": 1, | ||
"expires_at": "1970-01-01T00:00:00.000000+00:00", | ||
"guild_scheduled_event": { | ||
"id": "999999999999999999", | ||
"guild_id": "999999999999999999", | ||
"channel_id": "999999999999999999", | ||
"name": "none", | ||
"scheduled_start_time": "1970-01-01T00:00:00.000000+00:00", | ||
"scheduled_end_time": "1970-01-01T00:00:00.000000+00:00", | ||
"privacy_level": 1, | ||
"status": 1, | ||
"entity_type": 1, | ||
"entity_id": "999999999999999999", | ||
"entity_metadata": { } | ||
}, | ||
"uses": 1, | ||
"max_uses": 1, | ||
"max_age": 86400, | ||
"temporary": true, | ||
"created_at": "1970-01-01T00:00:00.000000+00:00" | ||
} |
70 changes: 70 additions & 0 deletions
70
...Remora.Discord.Tests/Samples/Objects/INVITE_WITH_METADATA/INVITE_WITH_METADATA.nulls.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"code": "123456", | ||
"guild": { }, | ||
"channel": null, | ||
"inviter": { | ||
"username": "none", | ||
"discriminator": "9999", | ||
"id": "999999999999999999", | ||
"avatar": "68b329da9893e34099c7d8ad5cb9c940" | ||
}, | ||
"target_type": 1, | ||
"target_user": { | ||
"username": "none", | ||
"discriminator": "9999", | ||
"id": "999999999999999999", | ||
"avatar": "68b329da9893e34099c7d8ad5cb9c940" | ||
}, | ||
"target_application": { | ||
"id": "999999999999999999", | ||
"name": "none", | ||
"icon": "68b329da9893e34099c7d8ad5cb9c940", | ||
"description": "none", | ||
"bot_public": true, | ||
"bot_require_code_grant": true, | ||
"verify_key": "none", | ||
"team": { | ||
"icon": "68b329da9893e34099c7d8ad5cb9c940", | ||
"id": "999999999999999999", | ||
"members": [ | ||
{ | ||
"membership_state": 2, | ||
"permissions": [ | ||
"*" | ||
], | ||
"team_id": "999999999999999999", | ||
"user": { | ||
"avatar": "68b329da9893e34099c7d8ad5cb9c940", | ||
"discriminator": "9999", | ||
"id": "999999999999999999", | ||
"username": "none" | ||
}, | ||
"role": "read_only" | ||
} | ||
], | ||
"name": "none", | ||
"owner_user_id": "999999999999999999" | ||
} | ||
}, | ||
"approximate_presence_count": 1, | ||
"approximate_member_count": 1, | ||
"expires_at": null, | ||
"guild_scheduled_event": { | ||
"id": "999999999999999999", | ||
"guild_id": "999999999999999999", | ||
"channel_id": "999999999999999999", | ||
"name": "none", | ||
"scheduled_start_time": "1970-01-01T00:00:00.000000+00:00", | ||
"scheduled_end_time": "1970-01-01T00:00:00.000000+00:00", | ||
"privacy_level": 1, | ||
"status": 1, | ||
"entity_type": 1, | ||
"entity_id": "999999999999999999", | ||
"entity_metadata": { } | ||
}, | ||
"uses": 1, | ||
"max_uses": 1, | ||
"max_age": 86400, | ||
"temporary": true, | ||
"created_at": "1970-01-01T00:00:00.000000+00:00" | ||
} |
9 changes: 9 additions & 0 deletions
9
...mora.Discord.Tests/Samples/Objects/INVITE_WITH_METADATA/INVITE_WITH_METADATA.options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"code": "123456", | ||
"channel": { }, | ||
"uses": 1, | ||
"max_uses": 1, | ||
"max_age": 86400, | ||
"temporary": true, | ||
"created_at": "1970-01-01T00:00:00.000000+00:00" | ||
} |