Ejemplo n.º 1
0
        public async Task GetSatelliteFilesAsync_ReturnsSatelliteFiles()
        {
            var files = await PackageReaderExtensions.GetSatelliteFilesAsync(
                _contentReader.Object,
                "fr",
                CancellationToken.None);

            Assert.Equal(new[] { "lib/net45/fr/a.resources.dll" }, files);
        }
Ejemplo n.º 2
0
        public async Task GetPackageFilesAsync_None_ReturnsEmptyEnumerable()
        {
            var packageFiles = await PackageReaderExtensions.GetPackageFilesAsync(
                _coreReader.Object,
                PackageSaveMode.None,
                CancellationToken.None);

            Assert.Empty(packageFiles);
        }
Ejemplo n.º 3
0
        public async Task GetSatelliteFilesAsync_ReturnsEmptyEnumerableIfNoMatchingFiles()
        {
            var files = await PackageReaderExtensions.GetSatelliteFilesAsync(
                _contentReader.Object,
                "kr",
                CancellationToken.None);

            Assert.Empty(files);
        }
Ejemplo n.º 4
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]);
        }
Ejemplo n.º 5
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);
        }