本文整理匯總了C#中NUnit.Framework.Tests.TestDirectory類的典型用法代碼示例。如果您正苦於以下問題:C# TestDirectory類的具體用法?C# TestDirectory怎麽用?C# TestDirectory使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
TestDirectory類屬於NUnit.Framework.Tests命名空間,在下文中一共展示了TestDirectory類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: AreEqualPassesWithDirectoryInfos
public void AreEqualPassesWithDirectoryInfos()
{
using (TestDirectory td = new TestDirectory("ParentDirectory"))
{
DirectoryAssert.AreEqual(td.directoryInformation, td.directoryInformation);
}
}
示例2: AreEqualFailsWhenOneIsNull
public void AreEqualFailsWhenOneIsNull()
{
using (TestDirectory td = new TestDirectory("ParentDirectory"))
{
DirectoryAssert.AreEqual(td.directoryInformation, null);
}
}
示例3: AreEqualFailsWhenOneDoesNotExist
public void AreEqualFailsWhenOneDoesNotExist()
{
using (TestDirectory td = new TestDirectory("ParentDirectory"))
{
DirectoryInfo actual = new DirectoryInfo("NotExistingDirectoryName");
DirectoryAssert.AreEqual(td.directoryInformation, actual);
}
}
示例4: AreEqualFailsWithStringPath
public void AreEqualFailsWithStringPath()
{
using (TestDirectory td1 = new TestDirectory("ParentDirectory1"))
{
using (TestDirectory td2 = new TestDirectory("ParentDirectory2"))
{
DirectoryAssert.AreEqual(td1.directoryName, td2.directoryName);
}
}
}
示例5: AreEqualFailsWithDirectoryInfos
public void AreEqualFailsWithDirectoryInfos()
{
using (TestDirectory td1 = new TestDirectory("ParentDirectory1"))
{
using (TestDirectory td2 = new TestDirectory("ParentDirectory2"))
{
DirectoryAssert.AreEqual(td1.directoryInformation, td2.directoryInformation);
}
}
}
示例6: IsWithinPassesWithStringPath
public void IsWithinPassesWithStringPath()
{
using (TestDirectory td = new TestDirectory("ParentDirectory", true))
{
DirectoryAssert.IsWithin(td.directoryName, td.diSubSubDirectory.FullName);
}
}
示例7: IsWithinPassesWithDirectoryInfo
public void IsWithinPassesWithDirectoryInfo()
{
using (TestDirectory td = new TestDirectory("ParentDirectory",true))
{
DirectoryAssert.IsWithin(td.directoryInformation, td.diSubSubDirectory);
}
}
示例8: IsWithinFailsWhenOutsidePathUsingStringPath
public void IsWithinFailsWhenOutsidePathUsingStringPath()
{
using (TestDirectory td = new TestDirectory("ParentDirectory", true))
{
DirectoryAssert.IsWithin(td.directoryName, Environment.SpecialFolder.System.ToString());
}
}
示例9: AreNotEqualPassesIfOneIsNull
public void AreNotEqualPassesIfOneIsNull()
{
using (TestDirectory td = new TestDirectory("ParentDirectory"))
{
DirectoryAssert.AreNotEqual(td.directoryInformation, null);
}
}
示例10: IsNotEmptyPassesWithNonEmptyDirectoryUsingStringPath
public void IsNotEmptyPassesWithNonEmptyDirectoryUsingStringPath()
{
using (TestDirectory td = new TestDirectory("ParentDirectory", true))
{
DirectoryAssert.IsNotEmpty(td.directoryName);
}
}
示例11: IsNotEmptyPassesWithNonEmptyDirectoryUsingDirectoryInfo
public void IsNotEmptyPassesWithNonEmptyDirectoryUsingDirectoryInfo()
{
using (TestDirectory td = new TestDirectory("ParentDirectory", true))
{
DirectoryAssert.IsNotEmpty(td.directoryInformation);
}
}
示例12: IsNotEmptyFailsWithInvalidDirectory
public void IsNotEmptyFailsWithInvalidDirectory()
{
using (TestDirectory td = new TestDirectory("ParentDirectory", false))
{
DirectoryAssert.IsNotEmpty(td.directoryName + "INVALID");
}
}
示例13: IsNotEmptyFailsWithEmptyDirectoryUsingStringPath
public void IsNotEmptyFailsWithEmptyDirectoryUsingStringPath()
{
using (TestDirectory td = new TestDirectory("ParentDirectory", false))
{
DirectoryAssert.IsNotEmpty(td.directoryName);
}
}
示例14: IsNotEmptyFailsWithEmptyDirectoryUsingDirectoryInfo
public void IsNotEmptyFailsWithEmptyDirectoryUsingDirectoryInfo()
{
using (TestDirectory td = new TestDirectory("ParentDirectory", false))
{
DirectoryAssert.IsNotEmpty(td.directoryInformation);
}
}
示例15: IsWithinFailsWhenOutsidePathUsingDirectoryInfo
public void IsWithinFailsWhenOutsidePathUsingDirectoryInfo()
{
using (TestDirectory td = new TestDirectory("ParentDirectory", true))
{
DirectoryInfo diSystemFolder = new DirectoryInfo(Environment.SpecialFolder.System.ToString());
DirectoryAssert.IsWithin(td.directoryInformation, diSystemFolder);
}
}