CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
TestHostEnvironment.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="TestHostEnvironment.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Helper class to support testing of behaviour under different hosting configurations</summary>
7//-----------------------------------------------------------------------
8using System;
9using System.Collections.Generic;
10using System.Text;
11using Microsoft.Extensions.FileProviders;
12using Microsoft.Extensions.Hosting;
13
14namespace Csla.TestHelpers
15{
16
21 public class TestHostEnvironment : IHostEnvironment
22 {
23
27 public string EnvironmentName { get; set; } = "Production";
28
32 public string ApplicationName { get; set; } = "ApplicationName";
33
37 public string ContentRootPath { get; set; } = @"C:\Windows\Temp";
38
42 public IFileProvider ContentRootFileProvider { get; set; }
43
44 }
45}
Basic implementation of IHostEnvironment, to support testing of anything that is dependent upon there...
string ContentRootPath
The path to the content root
string EnvironmentName
The name of the environment in which the application is being run
string ApplicationName
The name of the application
IFileProvider ContentRootFileProvider
The file provider to the content root; null by default