public void TestCleanup() { ContextInit contextInit = GetContextInit(); CustomTestCleanup(); if (contextInit.HasFlag(ContextInit.SaveCultureInfo)) { Thread.CurrentThread.CurrentCulture = CultureInfo; } if (contextInit.HasFlag(ContextInit.InitMainApplicationContext)) { MainContextAcquirer.Dispose(); } }
public void TestInitialize() { ContextInit contextInit = GetContextInit(); if (contextInit.HasFlag(ContextInit.InitMainApplicationContext)) { MainContextAcquirer = new MainApplicationContext().AcquireCurrentThread(); } if (contextInit.HasFlag(ContextInit.InitTimesCommon)) { TimesCommon.Current.TimesInitialize(); } if (contextInit.HasFlag(ContextInit.SaveCultureInfo)) { CultureInfo = Thread.CurrentThread.CurrentCulture; } CustomTestInitialize(); }
public TestFixtureInitAttribute(ContextInit contextInit) { ContextInit = contextInit; }