• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Categories.MessagesCategory类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中VkNet.Categories.MessagesCategory的典型用法代码示例。如果您正苦于以下问题:C# MessagesCategory类的具体用法?C# MessagesCategory怎么用?C# MessagesCategory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MessagesCategory类属于VkNet.Categories命名空间,在下文中一共展示了MessagesCategory类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetDialogs_AccessTokenInvalid_ThrowAccessTokenInvalidException

		public void GetDialogs_AccessTokenInvalid_ThrowAccessTokenInvalidException()
		{
			var cat = new MessagesCategory(new VkApi());
			int totalCount;
			int unreadCount;
			This.Action(() => cat.GetDialogs(out totalCount, out unreadCount, 0, 201)).Throws<AccessTokenInvalidException>();
		}
开发者ID:ProESM,项目名称:vk,代码行数:7,代码来源:MessagesCategoryTest.cs


示例2: GetDialogs_AccessTokenInvalid_ThrowAccessTokenInvalidException

		public void GetDialogs_AccessTokenInvalid_ThrowAccessTokenInvalidException()
		{
			var cat = new MessagesCategory(new VkApi());
			int totalCount;
			int unreadCount;
			Assert.That(() => cat.GetDialogs(out totalCount, out unreadCount, 0, 201), Throws.InstanceOf<AccessTokenInvalidException>());
		}
开发者ID:kadkin,项目名称:vk,代码行数:7,代码来源:MessagesCategoryTest.cs


示例3: MarkAsRead_AccessTokenInvalid_ThrowAccessTokenInvalidException

 public void MarkAsRead_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var cat = new MessagesCategory(new VkApi());
     This.Action(() => cat.MarkAsRead(1)).Throws<AccessTokenInvalidException>();
 }
开发者ID:Olegasdf,项目名称:vk,代码行数:5,代码来源:MessagesCategoryTest.cs


示例4: Get_AccessTokenInvalid_ThrowAccessTokenInvalidException

 public void Get_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var cat = new MessagesCategory(new VkApi());
     int totalCount;
     This.Action(() => cat.Get(MessageType.Received, out totalCount)).Throws<AccessTokenInvalidException>();
 }
开发者ID:Olegasdf,项目名称:vk,代码行数:6,代码来源:MessagesCategoryTest.cs


示例5: GetLastActivity_AccessTokenInvalid_ThrowAccessTokenInvalidException

 public void GetLastActivity_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var cat = new MessagesCategory(new VkApi());
     This.Action(() => cat.GetLastActivity(1)).Throws<AccessTokenInvalidException>();
 }
开发者ID:Olegasdf,项目名称:vk,代码行数:5,代码来源:MessagesCategoryTest.cs


示例6: GetHistory_AccessTokenInvalid_ThrowAccessTokenInvalidException

 public void GetHistory_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var cat = new MessagesCategory(new VkApi());
     int totalCount;
     This.Action(() => cat.GetHistory(out totalCount, false, 1)).Throws<AccessTokenInvalidException>();
 }
开发者ID:Olegasdf,项目名称:vk,代码行数:6,代码来源:MessagesCategoryTest.cs


示例7: GetById_Multiple_AccessTokenInvalid_ThrowAccessTokenInvalidException

 public void GetById_Multiple_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var cat = new MessagesCategory(new VkApi());
     int totalCount;
     This.Action(() => cat.GetById(out totalCount, new ulong[] { 1, 3, 5 })).Throws<AccessTokenInvalidException>();
 }
开发者ID:Olegasdf,项目名称:vk,代码行数:6,代码来源:MessagesCategoryTest.cs


示例8: Delete_Multiple_AccessTokenInvalid_ThrowAccessTokenInvalidException

 public void Delete_Multiple_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var cat = new MessagesCategory(new VkApi());
     This.Action(() => cat.Delete(new ulong[] { 1 })).Throws<AccessTokenInvalidException>();
 }
开发者ID:Olegasdf,项目名称:vk,代码行数:5,代码来源:MessagesCategoryTest.cs


示例9: RemoveChatUser_AccessTokenInvalid_ThrowAccessTokenInvalidException

 public void RemoveChatUser_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var cat = new MessagesCategory(new VkApi());
     cat.RemoveChatUser(2, 2);
 }
开发者ID:justloot,项目名称:vk,代码行数:5,代码来源:MessagesCategoryTest.cs


示例10: MarkAsRead_AccessTokenInvalid_ThrowAccessTokenInvalidException

 public void MarkAsRead_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var cat = new MessagesCategory(new VkApi());
     cat.MarkAsRead(1);
 }
开发者ID:justloot,项目名称:vk,代码行数:5,代码来源:MessagesCategoryTest.cs


示例11: Get_NormalCaseAllFields_Messages

        public void Get_NormalCaseAllFields_Messages()
        {
            url = "https://api.vk.com/method/messages.get?out=0&offset=5&count=3&filters=8&preview_length=100&time_offset=41712634&access_token=token";
            json =
                @"{
                    'response': [
                      2217,
                      {
                        'id': 4434,
                        'date': 1342169928,
                        'out': 0,
                        'user_id': 245242,
                        'read_state': 0,
                        'title': ' ... ',
                        'body': 'собирлись больше'
                      },
                      {
                        'id': 4433,
                        'date': 1342169920,
                        'out': 0,
                        'user_id': 245242,
                        'read_state': 0,
                        'title': ' ... ',
                        'body': 'не особо'
                      },
                      {
                        'id': 4431,
                        'date': 1342169360,
                        'out': 0,
                        'user_id': 245242,
                        'read_state': 1,
                        'title': ' ... ',
                        'body': 'наверное точно для демографии))'
                      }
                    ]
                  }";

            var browser = new Mock<IBrowser>();
            browser.Setup(m => m.GetJson(It.IsAny<string>())).Returns(json);
            var cat = new MessagesCategory(new VkApi {AccessToken = "token", Browser = browser.Object});

            int totalCount;
            var msgs = cat.Get(MessageType.Received, out totalCount, 3, 5, MessagesFilter.Important, 100, new DateTime(2012, 7, 1)).ToList();

            Assert.That(totalCount, Is.EqualTo(2217));
            Assert.That(msgs.Count, Is.EqualTo(3));

            Assert.That(msgs[0].Id, Is.EqualTo(4434));
            Assert.That(msgs[0].Date, Is.EqualTo(new DateTime(2012, 7, 13, 12, 58, 48)));
            Assert.That(msgs[0].Type, Is.EqualTo(MessageType.Received));
            Assert.That(msgs[0].UserId, Is.EqualTo(245242));
            Assert.That(msgs[0].ReadState, Is.EqualTo(MessageReadState.Unreaded));
            Assert.That(msgs[0].Title, Is.EqualTo(" ... "));
            Assert.That(msgs[0].Body, Is.EqualTo("собирлись больше"));

            Assert.That(msgs[1].Id, Is.EqualTo(4433));
            Assert.That(msgs[1].Date, Is.EqualTo(new DateTime(2012, 7, 13, 12, 58, 40)));
            Assert.That(msgs[1].Type, Is.EqualTo(MessageType.Received));
            Assert.That(msgs[1].UserId, Is.EqualTo(245242));
            Assert.That(msgs[1].ReadState, Is.EqualTo(MessageReadState.Unreaded));
            Assert.That(msgs[1].Title, Is.EqualTo(" ... "));
            Assert.That(msgs[1].Body, Is.EqualTo("не особо"));

            Assert.That(msgs[2].Id, Is.EqualTo(4431));
            Assert.That(msgs[2].Date, Is.EqualTo(new DateTime(2012, 7, 13, 12, 49, 20)));
            Assert.That(msgs[2].Type, Is.EqualTo(MessageType.Received));
            Assert.That(msgs[2].UserId, Is.EqualTo(245242));
            Assert.That(msgs[2].ReadState, Is.EqualTo(MessageReadState.Readed));
            Assert.That(msgs[2].Title, Is.EqualTo(" ... "));
            Assert.That(msgs[2].Body, Is.EqualTo("наверное точно для демографии))"));
        }
开发者ID:justloot,项目名称:vk,代码行数:71,代码来源:MessagesCategoryTest.cs


示例12: CreateChat_AccessTokenInvalid_ThrowAccessTokenInvalidException

 public void CreateChat_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var cat = new MessagesCategory(new VkApi());
     cat.CreateChat(new long[] { 1, 2 }, "hi, friends");
 }
开发者ID:justloot,项目名称:vk,代码行数:5,代码来源:MessagesCategoryTest.cs


示例13: GetLastActivity_AccessTokenInvalid_ThrowAccessTokenInvalidException

 public void GetLastActivity_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var cat = new MessagesCategory(new VkApi());
     cat.GetLastActivity(1);
 }
开发者ID:justloot,项目名称:vk,代码行数:5,代码来源:MessagesCategoryTest.cs


示例14: GetHistory_AccessTokenInvalid_ThrowAccessTokenInvalidException

 public void GetHistory_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var cat = new MessagesCategory(new VkApi());
     int totalCount;
     cat.GetHistory(1, false, out totalCount);
 }
开发者ID:justloot,项目名称:vk,代码行数:6,代码来源:MessagesCategoryTest.cs


示例15: GetDialogs_AccessTokenInvalid_ThrowAccessTokenInvalidException

 public void GetDialogs_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var cat = new MessagesCategory(new VkApi());
     int totalCount;
     cat.GetDialogs(1, out totalCount);
 }
开发者ID:justloot,项目名称:vk,代码行数:6,代码来源:MessagesCategoryTest.cs


示例16: Search_AccessTokenInvalid_ThrowAccessTokenInvalidException

 public void Search_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var cat = new MessagesCategory(new VkApi());
     int totalCount;
     This.Action(() => cat.Search("привет", out totalCount)).Throws<AccessTokenInvalidException>();
 }
开发者ID:Olegasdf,项目名称:vk,代码行数:6,代码来源:MessagesCategoryTest.cs


示例17: Send_AccessTokenInvalid_ThrowAccessTokenInvalidException

 public void Send_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var cat = new MessagesCategory(new VkApi());
     This.Action(() => cat.Send(new MessageSendParams {UserId = 1, Message = "Привет, Паша!" })).Throws<AccessTokenInvalidException>();
 }
开发者ID:Olegasdf,项目名称:vk,代码行数:5,代码来源:MessagesCategoryTest.cs


示例18: Restore_AccessTokenInvalid_ThrowAccessTokenInvalidException

 public void Restore_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var cat = new MessagesCategory(new VkApi());
     cat.Restore(1);
 }
开发者ID:justloot,项目名称:vk,代码行数:5,代码来源:MessagesCategoryTest.cs


示例19: EditChat_AccessTokenInvalid_ThrowAccessTokenInvalidException

 public void EditChat_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var cat = new MessagesCategory(new VkApi());
     This.Action(() => cat.EditChat(2, "new title")).Throws<AccessTokenInvalidException>();
 }
开发者ID:Olegasdf,项目名称:vk,代码行数:5,代码来源:MessagesCategoryTest.cs


示例20: SearchDialogs_AccessTokenInvalid_ThrowAccessTokenInvalidException

 public void SearchDialogs_AccessTokenInvalid_ThrowAccessTokenInvalidException()
 {
     var cat = new MessagesCategory(new VkApi());
     cat.SearchDialogs("hello");
 }
开发者ID:justloot,项目名称:vk,代码行数:5,代码来源:MessagesCategoryTest.cs



注:本文中的VkNet.Categories.MessagesCategory类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Utils.VkResponse类代码示例发布时间:2022-05-26
下一篇:
C# Shapes.PreviewPoint类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap