vknet_vk/VkNet.Tests/Models/GraffitiModel.cs
Инютин Максим Николаевич 3b145a3327 Рефакторинг проекта
2025-09-09 01:02:47 +03:00

37 lines
No EOL
862 B
C#

using AwesomeAssertions;
using VkNet.Model;
using Xunit;
namespace VkNet.Tests.Models;
public class GraffitiModel : BaseTest
{
[Fact(DisplayName = "Should deserialize from vk response to attachment")]
public void ShouldDeserializeFromVkResponseToAttachment()
{
ReadJsonFile("Models", "graffiti_attachment");
Url = "https://api.vk.ru/method/wall.get";
var result = Api.Wall.Get(new());
result.WallPosts[0]
.Attachments[0]
.Instance.Should()
.BeOfType<Graffiti>();
}
[Fact(DisplayName = "Should deserialize old api response to attachment")]
public void ShouldDeserializeOldApiResponseToAttachment()
{
ReadJsonFile("Models", "graffiti_attachment_for_960");
Url = "https://api.vk.ru/method/wall.get";
var result = Api.Wall.Get(new());
result.WallPosts[0]
.Attachments[0]
.Instance.Should()
.BeOfType<Graffiti>();
}
}