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)); }
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); }
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()); }
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); }
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}"); }