public void ConfigFileInUseShouldSetAppropriateError( ) { MockConfigManager.ClearLastError( ); Assert.IsNull(MockConfigManager.LastError); Directory.CreateDirectory(MockConfigFolderName); using (File.Create(ConfigPath)) { Assert.DoesNotThrow(MockConfigManager.Load); Assert.IsInstanceOf <IOException> (MockConfigManager.LastError); MockConfigManager.ClearLastError( ); Assert.DoesNotThrow(MockConfigManager.Save); Assert.IsInstanceOf <IOException> (MockConfigManager.LastError); MockConfigManager.ClearLastError( ); } }
public void TearDown( ) { MockConfigManager.Reset( ); }