File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ // Licensed to the .NET Foundation under one or more agreements.
2+ // The .NET Foundation licenses this file to you under the Apache 2.0 License
3+ // See the LICENSE file in the project root for more information.
4+ // Maintainer: Argo Zhang([email protected] ) Website: https://www.blazor.zone 5+
6+ using Microsoft . Extensions . FileProviders ;
7+ using Microsoft . Extensions . Hosting ;
8+
9+ namespace UnitTest . Extensions ;
10+
11+ public class HostEnvironmentExtensionsTest
12+ {
13+ [ Fact ]
14+ public void IsWasm_Ok ( )
15+ {
16+ var hostEnvironment = new MockWasmHostEnvironment ( ) ;
17+ Assert . False ( hostEnvironment . IsWasm ( ) ) ;
18+ }
19+
20+ class MockWasmHostEnvironment : IHostEnvironment
21+ {
22+ public string EnvironmentName { get ; set ; } = "Development" ;
23+
24+ public string ApplicationName { get ; set ; } = "BootstrapBlazor" ;
25+
26+ public string ContentRootPath { get ; set ; } = "" ;
27+
28+ public IFileProvider ContentRootFileProvider { get ; set ; } = null ! ;
29+ }
30+ }
You can’t perform that action at this time.
0 commit comments