示例#1
0
        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( );
            }
        }
示例#2
0
 public void TearDown( )
 {
     MockConfigManager.Reset( );
 }