-
-
Notifications
You must be signed in to change notification settings - Fork 382
Expand file tree
/
Copy pathHostEnvironmentExtensionsTest.cs
More file actions
30 lines (23 loc) · 946 Bytes
/
HostEnvironmentExtensionsTest.cs
File metadata and controls
30 lines (23 loc) · 946 Bytes
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
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License
// See the LICENSE file in the project root for more information.
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Hosting;
namespace UnitTest.Extensions;
public class HostEnvironmentExtensionsTest
{
[Fact]
public void IsWasm_Ok()
{
var hostEnvironment = new MockWasmHostEnvironment();
Assert.False(hostEnvironment.IsWasm());
}
class MockWasmHostEnvironment : IHostEnvironment
{
public string EnvironmentName { get; set; } = "Development";
public string ApplicationName { get; set; } = "BootstrapBlazor";
public string ContentRootPath { get; set; } = "";
public IFileProvider ContentRootFileProvider { get; set; } = null!;
}
}