Beispiel #1
0
        public async Task GetPackageFilesAsync_None_ReturnsEmptyEnumerable()
        {
            var packageFiles = await PackageReaderExtensions.GetPackageFilesAsync(
                _coreReader.Object,
                PackageSaveMode.None,
                CancellationToken.None);

            Assert.Empty(packageFiles);
        }
Beispiel #2
0
        public async Task GetPackageFilesAsync_Nuspec_ReturnsNuspec()
        {
            var packageFiles = (await PackageReaderExtensions.GetPackageFilesAsync(
                                    _coreReader.Object,
                                    PackageSaveMode.Nuspec,
                                    CancellationToken.None)).ToArray();

            Assert.Equal(1, packageFiles.Length);
            Assert.Equal("a.nuspec", packageFiles[0]);
        }
Beispiel #3
0
        public async Task GetPackageFilesAsync_ReturnsFiles(PackageSaveMode packageSaveMode)
        {
            var packageFiles = (await PackageReaderExtensions.GetPackageFilesAsync(
                                    _coreReader.Object,
                                    packageSaveMode,
                                    CancellationToken.None)).ToArray();

            Assert.Equal(new[]
            {
                "b",
                "/c/a.nuspec",
                @"\c/a.nuspec",
                "/c/d",
                @"\c\d"
            }, packageFiles);
        }