Esempio n. 1
0
        protected override void Establish_context()
        {
            LoadConfiguration();

            DbProviderFactories.RegisterFactory("System.Data.SqlClient", SqlClientFactory.Instance);

            var dir = TestContext.CurrentContext.TestDirectory;

            Directory.SetCurrentDirectory(dir);

            SetupServiceProvider();

            Context = ServiceProvider.GetService <MusicDbContext>();

            TestCaseService = new TestCaseService(Context);
            if (ShouldLoadTestObjects)
            {
                MusicObjects = new MusicTestsDataObjects(Context);
                MusicObjects.LoadObjects();
            }

            TestStartedDatTime = DateTime.Now;

            base.Establish_context();
        }
Esempio n. 2
0
 public MusicObjects(MusicDbContext musicDbContext)
 {
     MusicDataObjects      = new MusicDataObjects(musicDbContext);
     MusicTestsDataObjects = new MusicTestsDataObjects(musicDbContext);
 }