Пример #1
0
        public void should_contain_at_least_one_item_in_tree()
        {
            // arrange
            var adapter = new GithubAdapter("alexanderbeletsky", "blog.beletsky.net");

            // act
            var references = adapter.GetAllReferences();
            var tree       = adapter.GetTrees(references.First().Object.Sha);

            // assert
            tree.Tree.Count.Should().BeGreaterOrEqualTo(1);
        }
Пример #2
0
        public void should_trees_contain_tree()
        {
            // arrange
            var adapter = new GithubAdapter("alexanderbeletsky", "blog.beletsky.net");

            // act
            var references = adapter.GetAllReferences();
            var tree       = adapter.GetTrees(references.First().Object.Sha);

            // assert
            tree.Tree.Should().NotBeNull();
        }
Пример #3
0
        public void should_blob_contain_content_field()
        {
            // arrange
            var adapter = new GithubAdapter("alexanderbeletsky", "blog.beletsky.net");

            // act
            var references = adapter.GetAllReferences();
            var trees      = adapter.GetTrees(references.First().Object.Sha);
            var blob       = adapter.GetBlob(trees.Tree.First().Sha);

            // assert
            blob.Content.Should().NotBeEmpty();
        }
Пример #4
0
        public void should_tree_contain_path_and_url_and_sha()
        {
            // arrange
            var adapter = new GithubAdapter("alexanderbeletsky", "blog.beletsky.net");

            // act
            var references = adapter.GetAllReferences();
            var tree       = adapter.GetTrees(references.First().Object.Sha);

            // assert
            tree.Tree.First().Path.Should().NotBeEmpty();
            tree.Tree.First().Url.Should().NotBeEmpty();
            tree.Tree.First().Sha.Should().NotBeEmpty();
        }