/// <summary> /// Инициализирует новый экземпляр класса <see cref="VkApi"/>. /// </summary> public VkApi() { Browser = new Browser(); Users = new UsersCategory(this); Friends = new FriendsCategory(this); Status = new StatusCategory(this); Messages = new MessagesCategory(this); Groups = new GroupsCategory(this); Audio = new AudioCategory(this); Wall = new WallCategory(this); Database = new DatabaseCategory(this); Utils = new UtilsCategory(this); Fave = new FaveCategory(this); Video = new VideoCategory(this); Account = new AccountCategory(this); Photo = new PhotoCategory(this); Docs = new DocsCategory(this); Likes = new LikesCategory(this); Pages = new PagesCategory(this); Gifts = new GiftsCategory(this); Apps = new AppsCategory(this); NewsFeed = new NewsFeedCategory(this); Stats = new StatsCategory(this); Auth = new AuthCategory(this); Markets = new MarketsCategory(this); Execute = new ExecuteCategory(this); RequestsPerSecond = 3; }
public void GetById_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); Assert.That(() => cat.GetById(1), Throws.InstanceOf <AccessTokenInvalidException>()); }
public void RemoveChatUser_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); Assert.That(() => cat.RemoveChatUser(2, 2), Throws.InstanceOf <AccessTokenInvalidException>()); }
public void CreateChat_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); Assert.That(() => cat.CreateChat(new ulong[] { 1, 2 }, "hi, friends"), Throws.InstanceOf <AccessTokenInvalidException>()); }
public void CreateChat_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.CreateChat(new long[] { 1, 2 }, "hi, friends")).Throws <AccessTokenInvalidException>(); }
public void MarkAsRead_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.MarkAsRead(1)).Throws <AccessTokenInvalidException>(); }
public void Delete_Multiple_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.Delete(new long[] { 1 })).Throws <AccessTokenInvalidException>(); }
public void SearchDialogs_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.SearchDialogs("hello")).Throws <AccessTokenInvalidException>(); }
public void AddChatUser_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); cat.AddChatUser(2, 2); }
public void GetChatUsers_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); cat.GetChatUsers(2); }
public void EditChat_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); cat.EditChat(2, "new title"); }
public void GetLastActivity_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); cat.GetLastActivity(1); }
public void MarkAsRead_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); cat.MarkAsRead(1); }
public void Restore_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); cat.Restore(1); }
public void DeleteDialog_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); cat.DeleteDialog(111, false); }
public void Delete_Multiple_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); Assert.That(() => cat.Delete(new ulong[] { 1 }), Throws.InstanceOf <AccessTokenInvalidException>()); }
public void Delete_Multiple_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); cat.Delete(new long[] { 1 }); }
/// <summary> /// Инициализирует новый экземпляр класса <see cref="VkApi"/>. /// </summary> public VkApi() { Browser = new Browser(); Users = new UsersCategory(this); Friends = new FriendsCategory(this); Status = new StatusCategory(this); Messages = new MessagesCategory(this); Groups = new GroupsCategory(this); Audio = new AudioCategory(this); Wall = new WallCategory(this); Database = new DatabaseCategory(this); Utils = new UtilsCategory(this); Fave = new FaveCategory(this); Video = new VideoCategory(this); Account = new AccountCategory(this); ApiVersion = "5.9"; }
public void Send_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.Send(1, false, "Привет, Паша!")).Throws <AccessTokenInvalidException>(); }
internal MessagesCategoryExtended(MessagesCategory messagesCategory, VkApi vk) { _messages = messagesCategory; _vk = vk; }
public void DeleteDialog_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.DeleteDialog(111, false)).Throws <AccessTokenInvalidException>(); }
public void Restore_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(vk: new VkApi()); Assert.That(del: () => cat.Restore(messageId: 1), expr: Throws.InstanceOf <AccessTokenInvalidException>()); }
public void GetChat_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.GetChat(1)).Throws <AccessTokenInvalidException>(); }
public void DeleteDialog_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(vk: new VkApi()); Assert.That(del: () => cat.DeleteDialog(userId: 111), expr: Throws.InstanceOf <AccessTokenInvalidException>()); }
public void DeleteDialog_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); Assert.That(() => cat.DeleteDialog(111, false), Throws.InstanceOf <AccessTokenInvalidException>()); }
public void EditChat_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(vk: new VkApi()); Assert.That(del: () => cat.EditChat(chatId: 2, title: "new title"), expr: Throws.InstanceOf <AccessTokenInvalidException>()); }
public void EditChat_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); Assert.That(() => cat.EditChat(2, "new title"), Throws.InstanceOf <AccessTokenInvalidException>()); }
public void Get_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(vk: new VkApi()); Assert.That(del: () => cat.Get(@params: new MessagesGetParams()), expr: Throws.InstanceOf <AccessTokenInvalidException>()); }
public void GetLongPollHistory_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); Assert.That(() => cat.GetLongPollHistory(new MessagesGetLongPollHistoryParams()), Throws.InstanceOf <AccessTokenInvalidException>()); }
public void AddChatUser_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(vk: new VkApi()); Assert.That(del: () => cat.AddChatUser(chatId: 2, userId: 2), expr: Throws.InstanceOf <AccessTokenInvalidException>()); }
public void SearchDialogs_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); Assert.That(() => cat.SearchDialogs("hello"), Throws.InstanceOf <AccessTokenInvalidException>()); }
public void GetLastActivity_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(vk: new VkApi()); Assert.That(del: () => cat.GetLastActivity(userId: 1), expr: Throws.InstanceOf <AccessTokenInvalidException>()); }
/// <summary> /// Инициализирует новый экземпляр класса <see cref="VkApi"/>. /// </summary> public VkApi() { Browser = new Browser(); Users = new UsersCategory(this); Friends = new FriendsCategory(this); Status = new StatusCategory(this); Messages = new MessagesCategory(this); Groups = new GroupsCategory(this); Audio = new AudioCategory(this); Wall = new WallCategory(this); Database = new DatabaseCategory(this); Utils = new UtilsCategory(this); Fave = new FaveCategory(this); Video = new VideoCategory(this); Account = new AccountCategory(this); Photo = new PhotoCategory(this); Docs = new DocsCategory(this); Likes = new LikesCategory(this); RequestsPerSecond = 3; }
public void RemoveChatUser_AccessTokenInvalid_ThrowAccessTokenInvalidException() { var cat = new MessagesCategory(new VkApi()); This.Action(() => cat.RemoveChatUser(2, 2)).Throws <AccessTokenInvalidException>(); }