コード例 #1
0
ファイル: WallCategoryTest.cs プロジェクト: p4rnicke/vk
        public void GetComments_IncorrectParameters_ThrowArgumentException()
        {
            int id;

            Assert.That(() => _defaultWall.GetComments(1, -1, out id), Throws.ArgumentException.And.Property("ParamName").EqualTo("postId"));
            Assert.That(() => _defaultWall.GetComments(1, 1, out id, count: -1), Throws.ArgumentException.And.Property("ParamName").EqualTo("count"));
            Assert.That(() => _defaultWall.GetComments(1, 1, out id, offset: -1), Throws.ArgumentException.And.Property("ParamName").EqualTo("offset"));
            Assert.That(() => _defaultWall.GetComments(1, 1, out id, previewLength: -1), Throws.ArgumentException.And.Property("ParamName").EqualTo("previewLength"));
        }
コード例 #2
0
ファイル: WallCategoryTest.cs プロジェクト: nijikilling/vk
        public void GetComments_AccessTokenInvalid_ThrowAccessTokenInvalidException()
        {
            int totalCount;

            Assert.That(() => _defaultWall.GetComments(12312, 12345, out totalCount, SortOrderBy.Asc, true), Throws.InstanceOf <AccessTokenInvalidException>());
        }