← Back to team overview

nunit-core team mailing list archive

[Bug 574408] Re: DirectoryAssert fails to recognise the sub folder using IsWithin

 

DirectoryAssert is being dropped from the 3.0 framework.

** Changed in: nunit-3.0
       Status: Triaged => Won't Fix

-- 
DirectoryAssert fails to recognise the sub folder using IsWithin
https://bugs.launchpad.net/bugs/574408
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.

Status in NUnit Test Framework: Won't Fix
Status in NUnit V2 Test Framework: Fix Released

Bug description:
Fails to recognize the second path was the direct sub directory.


            var tempPath = Path.GetTempPath();
            var tempPathParent = Path.GetDirectoryName(Path.GetDirectoryName(tempPath));

            DirectoryAssert.AreEqual(new DirectoryInfo(tempPath), new DirectoryInfo(tempPath));

            Assert.That(tempPath, Is.SamePathOrUnder(tempPathParent));

            // bugs??
            DirectoryAssert.IsWithin(tempPathParent, tempPath);    // failed the tests





References