示例#1
0
 public virtual void Dispose()
 {
     if (_singleton == this)
     {
         _singleton = null;
     }
 }
示例#2
0
        /// <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";
        }
示例#3
0
		public virtual void Dispose()
		{
			if (_singleton == this)
			{
				_singleton = null;
			}
		}
示例#4
0
		/// <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";
		}