public virtual void Dispose() { if (_singleton == this) { _singleton = null; } }
/// <summary> /// Many tests throughout the system will not care at all about project related things, /// but they will break if there is no project initialized, since many things /// will reach the project through a static property. /// Those tests can just call this before doing anything else, so /// that other things don't break. /// </summary> public static void InitializeForTests() { ErrorReport.IsOkToInteractWithUser = false; var project = new BasilProject(); project.LoadFromProjectDirectoryPath(BasilProject.GetPretendProjectDirectory()); project.UiOptions.Language = "en"; }
/// <summary> /// Many tests throughout the system will not care at all about project related things, /// but they will break if there is no project initialized, since many things /// will reach the project through a static property. /// Those tests can just call this before doing anything else, so /// that other things don't break. /// </summary> public static void InitializeForTests() { ErrorReport.IsOkToInteractWithUser = false; BasilProject project = new BasilProject(); project.LoadFromProjectDirectoryPath(GetPretendProjectDirectory()); project.StringCatalogSelector = "en"; }