示例#1
0
        public void TestCleanup()
        {
            ContextInit contextInit = GetContextInit();

            CustomTestCleanup();

            if (contextInit.HasFlag(ContextInit.SaveCultureInfo))
            {
                Thread.CurrentThread.CurrentCulture = CultureInfo;
            }
            if (contextInit.HasFlag(ContextInit.InitMainApplicationContext))
            {
                MainContextAcquirer.Dispose();
            }
        }
示例#2
0
        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();
        }