Exemplo n.º 1
0
        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"));
        }
Exemplo n.º 2
0
        public void GetComments_AccessTokenInvalid_ThrowAccessTokenInvalidException()
        {
            int totalCount;

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