public void Update(string evt, params object[] data) { switch (evt) { case LMSNotifications.ApplicationStart: var cacheProvider = container.Resolve <ICacheProvider>(); var userStorage = new FakeDatabaseUserStorage(container.Resolve <ILmsService>(), "lex"); var cachedUserStorage = new CachedUserStorage(userStorage, cacheProvider); var demoStorage = container.Resolve <IDemoStorage>(); UserGenerator.Generate(cachedUserStorage, demoStorage); this.GeneratePascal(); this.GenerateForTestingSystemSeleniumTests(); this.GenerateForSeleniumTests(); break; } }
private void GenerateForTestingSystemSeleniumTests() { var cacheProvider = container.Resolve <ICacheProvider>(); IUserStorage userStorage = new FakeDatabaseUserStorage(container.Resolve <ILmsService>(), "lex"); IUserStorage cachedUserStorage = new CachedUserStorage(userStorage, cacheProvider); var demoStorage = container.Resolve <IDemoStorage>(); UserGenerator.GenerateForTestingSystemSeleniumTests(cachedUserStorage, demoStorage); var path = (new System.Uri(Assembly.GetExecutingAssembly().CodeBase)).AbsolutePath; path = path.Replace("IUDICO.LMS/Plugins/IUDICO.DataGenerator.DLL", "IUDICO.DataGenerator/Content/Disciplines/Testing discipline.zip"); var databaseStorage = new FakeDatabaseDisciplineStorage(container.Resolve <ILmsService>(), "SeleniumTeacher"); var storage = new CachedDisciplineStorage(databaseStorage, cacheProvider); var curriculumStorage = container.Resolve <ICurriculumStorage>(); userStorage = container.Resolve <IUserStorage>(); var disciplineStorage = container.Resolve <IDisciplineStorage>(); DisciplineGenerator.SeleniumTestingSystemTestDiscipline(storage, path); CurriculumGenerator.CurriculumForSeleniumTestingSystem(curriculumStorage, disciplineStorage, userStorage); }