-
-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Обработчик неизвестных значений энам (#1568)
Co-authored-by: inyutin-maxim <[email protected]>
- Loading branch information
1 parent
aa860f9
commit 73e25b8
Showing
21 changed files
with
602 additions
and
145 deletions.
There are no files selected for viewing
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
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,62 @@ | ||
using System.Linq; | ||
using FluentAssertions; | ||
using VkNet.Enums.StringEnums; | ||
using VkNet.Tests.Infrastructure; | ||
using Xunit; | ||
|
||
namespace VkNet.Tests.Enum; | ||
|
||
public class EnumSkipErrorTest : CategoryBaseTest | ||
{ | ||
/// <inheritdoc /> | ||
protected override string Folder => "SkipEnum"; | ||
|
||
[Fact] | ||
public void CheckStatus() | ||
{ | ||
Url = "https://api.vk.com/method/asr.checkStatus"; | ||
|
||
ReadCategoryJsonPath(nameof(CheckStatus)); | ||
|
||
if (Api.DeserializationErrorHandler is not true) | ||
{ | ||
return; | ||
} | ||
|
||
var result = Api.Asr.CheckStatus("7ee0fa8e-64ac-4391-af7a-5c98a6330866"); | ||
|
||
result.Id.Should() | ||
.Be("7ee0fa8e-64ac-4391-af7a-5c98a6330866"); | ||
|
||
result.Text.Should() | ||
.Be("Это тестовая запись для сервиса распознавания речи ВКонтакте."); | ||
|
||
result.Status.Should() | ||
.Be(null); | ||
} | ||
|
||
[Fact] | ||
public void Get_CheckType() | ||
{ | ||
Url = "https://api.vk.com/method/apps.get"; | ||
ReadCategoryJsonPath(nameof(Get_CheckType)); | ||
|
||
if (Api.DeserializationErrorHandler is not true) | ||
{ | ||
return; | ||
} | ||
|
||
var app = Api.Apps.Get(new() | ||
{ | ||
AppIds = new ulong[] | ||
{ | ||
4268118 | ||
}, | ||
Platform = AppPlatforms.Web | ||
}); | ||
|
||
app.Apps.First() | ||
.Type.Should() | ||
.Be(null); | ||
} | ||
} |
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
Oops, something went wrong.