Exemple #1
0
        public void Should_return_at_least_one_package()
        {
            var sut = new NuGetPackageSourceV2();

            var result = sut.Search("Microsoft.CSharp");

            result.Should().NotBeEmpty().And.NotContainNulls();
        }
Exemple #2
0
        public void Should_return_at_least_one_pre_release_version_of_a_package()
        {
            var sut = new NuGetPackageSourceV2();

            var result = sut.Search("Microsoft.CSharp", includePreRelease: true);

            result.Should().NotContain(package => package.IsPreRelease, "The pre-release filter is ignored by the V2 API");
        }
Exemple #3
0
        public void Should_not_return_any_prerelease_versions_of_the_packages()
        {
            var sut = new NuGetPackageSourceV2();

            var result = sut.Search("Microsoft.CSharp");

            result.Should().NotContain(package => package.IsPreRelease);
        }
Exemple #4
0
        public void Should_include_the_gallery_url_in_the_returned_packages()
        {
            var sut = new NuGetPackageSourceV2();

            var result = sut.Search("Microsoft.CSharp");

            result.Should().OnlyContain(package => package.GalleryUrl != null);
        }
Exemple #5
0
        public void Should_include_the_download_count_in_the_returned_packages()
        {
            var sut = new NuGetPackageSourceV2();

            var result = sut.Search("Microsoft.CSharp");

            result.Should().OnlyContain(package => package.DownloadCount > 0);
        }
Exemple #6
0
        public void Should_include_the_description_in_the_returned_packages()
        {
            var sut = new NuGetPackageSourceV2();

            var result = sut.Search("Microsoft.CSharp");

            result.Should().OnlyContain(package => package.Description != null);
        }
Exemple #7
0
        public void Should_return_at_least_one_package_whose_authors_contain_the_keyword()
        {
            var sut = new NuGetPackageSourceV2();

            var result = sut.Search("Microsoft");

            result.Should().Contain(package => package.Authors.Contains("Microsoft"));
        }