本文整理汇总了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);
}
}