-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathInstallTests.cs
More file actions
35 lines (29 loc) · 1.17 KB
/
InstallTests.cs
File metadata and controls
35 lines (29 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Threading.Tasks;
namespace Microsoft.Web.LibraryManager.Cli.IntegrationTest;
[TestClass]
public class InstallTests : CliTestBase
{
[TestMethod]
public async Task Install_FileSpecified()
{
await ExecuteCliToolAsync("install jquery@3.6.0 --provider cdnjs --destination test/jquery --files jquery.min.js");
AssertFileExists("test/jquery/jquery.min.js");
}
[TestMethod]
public async Task Install_UsingTemplateInDefaultDestination()
{
string manifest = """
{
"version": "3.0",
"defaultProvider": "cdnjs",
"defaultDestination": "wwwroot/lib/[Name]/"
}
""";
await CreateManifestFileAsync(manifest);
await ExecuteCliToolAsync("install bootstrap@5.3.2 --provider cdnjs --files css/bootstrap.min.css --files js/bootstrap.bundle.min.js");
AssertFileExists("wwwroot/lib/bootstrap/css/bootstrap.min.css");
AssertFileExists("wwwroot/lib/bootstrap/js/bootstrap.bundle.min.js");
}
}