wcf/tests/AssemblyInit.cs

24 строки
654 B
C#
Исходник Постоянная ссылка Обычный вид История

2019-01-26 12:47:15 +03:00
using System.ServiceModel;
using System.Web.Hosting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Unity.Wcf.Tests
{
[TestClass]
2019-01-26 13:50:06 +03:00
public class AssemblyInit
2019-01-26 12:47:15 +03:00
{
[AssemblyInitialize]
public static void TestFixtureSetup(TestContext context)
{
if (!HostingEnvironment.IsHosted)
{
// The instance constructor hooks up the singleton hosting environment, ewww...
new HostingEnvironment();
// Check the hosting environment is fully initialized
ServiceHostingEnvironment.EnsureInitialized();
}
}
}
}