コード例 #1
0
        public static async Task <IPackage> InstalledPackageWithBlazorEnabled([CallerMemberName] string testName = null)
        {
            var(packageName, addSource) = await NupkgWithBlazorEnabled(testName);

            var destination = Package.DefaultPackagesDirectory;
            await InstallCommand.Do(new InstallOptions(packageName, new PackageSource(addSource.FullName), destination), new TestConsole());

            var strategy = new WebAssemblyAssetFinder(new FileSystemDirectoryAccessor(destination));

            return(await strategy.Find <IPackage>(packageName));
        }
コード例 #2
0
        public async Task Discovers_built_blazor_package()
        {
            var(packageName, addSource) = await Create.NupkgWithBlazorEnabled();

            await InstallCommand.Do(new InstallOptions(packageName, new PackageSource(addSource.FullName)), new TestConsole());

            var locator = new PrebuiltBlazorPackageLocator();

            var asset = await locator.Locate(packageName);

            asset.DirectoryAccessor.FileExists(new MLS.Agent.Tools.RelativeFilePath("index.html")).Should().Be(true);
        }
コード例 #3
0
ファイル: Create.cs プロジェクト: rlundy/try
        public static async Task <Package> InstalledPackageWithBlazorEnabled([CallerMemberName] string testName = null)
        {
            var(packageName, addSource) = await NupkgWithBlazorEnabled(testName);

            var destination = Package.DefaultPackagesDirectory;
            await InstallCommand.Do(new InstallOptions(addSource, packageName, destination), new TestConsole());

            var strategy = new LocalToolInstallingPackageDiscoveryStrategy(destination);
            var builder  = await strategy.Locate(new PackageDescriptor(packageName));

            return((Package)builder.GetPackage());
        }
コード例 #4
0
        public async Task Discovers_built_blazor_package()
        {
            var(packageName, addSource) = await Create.NupkgWithBlazorEnabled();

            await InstallCommand.Do(new InstallOptions(new PackageSource(addSource.FullName), packageName), new TestConsole());

            var locator = new PrebuiltBlazorPackageLocator();

            var asset = await locator.Locate(packageName);

            asset.DirectoryAccessor.DirectoryExists("MLS.Blazor").Should().Be(true);
        }
コード例 #5
0
        public async Task Discovers_built_blazor_package()
        {
            var(packageName, addSource) = await Create.NupkgWithBlazorEnabled();

            await InstallCommand.Do(new InstallOptions(addSource, packageName), new TestConsole());

            var locator = new PrebuiltBlazorPackageLocator();

            var package = await locator.Locate(packageName);

            package.Name.Should().Be($"runner-{packageName}");
        }