public void Setup()
		{
			m_origOs = (IFileOS)ReflectionHelper.GetField(typeof(FileUtils), "s_fileos");
			// Need a new one each time so tests don't affect each other.
			m_fileOs = new MockFileOS();
			ReflectionHelper.SetField(typeof(FileUtils), "s_fileos", m_fileOs);
		}
 public void Setup()
 {
     m_origOs = (IFileOS)ReflectionHelper.GetField(typeof(FileUtils), "s_fileos");
     // Need a new one each time so tests don't affect each other.
     m_fileOs = new MockFileOS();
     ReflectionHelper.SetField(typeof(FileUtils), "s_fileos", m_fileOs);
 }
Esempio n. 3
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Sets the IFileOS adapter.
 /// </summary>
 /// ------------------------------------------------------------------------------------
 public static void SetFileAdapter(IFileOS adapter)
 {
     s_fileos = adapter;
 }
Esempio n. 4
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes the <see cref="FileUtils"/> class.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		static FileUtils()
		{
			s_fileos = new SystemIOProxy();
		}
Esempio n. 5
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes the <see cref="FileUtils"/> class.
 /// </summary>
 /// ------------------------------------------------------------------------------------
 static FileUtils()
 {
     s_fileos = new SystemIOProxy();
 }