public void TestSetCurrentDirectory() { var originalDir = Directory.GetCurrentDirectory(); try { Assert.Throws <NotSupportedException>(() => Directory.SetCurrentDirectory(longPathDirectory)); } finally { Assert.Throws <NotSupportedException>(() => Directory.SetCurrentDirectory(originalDir)); } }
public void TestCurrentDirectory() { var di = new DirectoryInfo("."); Assert.AreEqual(di.FullName, Directory.GetCurrentDirectory()); }