Esempio n. 1
0
        public void Test()
        {
            AppDomain.CurrentDomain.SetData("DataDirectory", Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData));

            Database.SetInitializer <RemontTestContext>(new InitTestDb());
            using (RemontTestContext testcontext = new RemontTestContext())
            {
                testcontext.Database.Initialize(true);
            }
        }
Esempio n. 2
0
        public static IRemontTestContext GetInstance()
        {
            if (remontContext == null)
            {
                lock (typeof(RemontTestContext))
                {
                    if (remontContext == null)
                    {
                        remontContext = new RemontTestContext();
                    }
                }
            }

            return(remontContext);
        }