當前位置: 首頁>>代碼示例>>C#>>正文


C# Tests.TestDirectory類代碼示例

本文整理匯總了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);
     }
 }
開發者ID:Phaiax,項目名稱:dotnetautoupdate,代碼行數:7,代碼來源:DirectoryAssertTests.cs

示例2: AreEqualFailsWhenOneIsNull

 public void AreEqualFailsWhenOneIsNull()
 {
     using (TestDirectory td = new TestDirectory("ParentDirectory"))
     {
         DirectoryAssert.AreEqual(td.directoryInformation, null);
     }
 }
開發者ID:Phaiax,項目名稱:dotnetautoupdate,代碼行數:7,代碼來源:DirectoryAssertTests.cs

示例3: AreEqualFailsWhenOneDoesNotExist

 public void AreEqualFailsWhenOneDoesNotExist()
 {
     using (TestDirectory td = new TestDirectory("ParentDirectory"))
     {
         DirectoryInfo actual = new DirectoryInfo("NotExistingDirectoryName");
         DirectoryAssert.AreEqual(td.directoryInformation, actual);
     }
 }
開發者ID:Phaiax,項目名稱:dotnetautoupdate,代碼行數:8,代碼來源:DirectoryAssertTests.cs

示例4: AreEqualFailsWithStringPath

 public void AreEqualFailsWithStringPath()
 {
     using (TestDirectory td1 = new TestDirectory("ParentDirectory1"))
     {
         using (TestDirectory td2 = new TestDirectory("ParentDirectory2"))
         {
             DirectoryAssert.AreEqual(td1.directoryName, td2.directoryName);
         }
     }
 }
開發者ID:Phaiax,項目名稱:dotnetautoupdate,代碼行數:10,代碼來源:DirectoryAssertTests.cs

示例5: AreEqualFailsWithDirectoryInfos

 public void AreEqualFailsWithDirectoryInfos()
 {
     using (TestDirectory td1 = new TestDirectory("ParentDirectory1"))
     {
         using (TestDirectory td2 = new TestDirectory("ParentDirectory2"))
         {
             DirectoryAssert.AreEqual(td1.directoryInformation, td2.directoryInformation);
         }
     }
 }
開發者ID:Phaiax,項目名稱:dotnetautoupdate,代碼行數:10,代碼來源:DirectoryAssertTests.cs

示例6: IsWithinPassesWithStringPath

 public void IsWithinPassesWithStringPath()
 {
     using (TestDirectory td = new TestDirectory("ParentDirectory", true))
     {
         DirectoryAssert.IsWithin(td.directoryName, td.diSubSubDirectory.FullName);
     }
 }
開發者ID:Phaiax,項目名稱:dotnetautoupdate,代碼行數:7,代碼來源:DirectoryAssertTests.cs

示例7: IsWithinPassesWithDirectoryInfo

 public void IsWithinPassesWithDirectoryInfo()
 {
     using (TestDirectory td = new TestDirectory("ParentDirectory",true))
     {
         DirectoryAssert.IsWithin(td.directoryInformation, td.diSubSubDirectory);
     }
 }
開發者ID:Phaiax,項目名稱:dotnetautoupdate,代碼行數:7,代碼來源:DirectoryAssertTests.cs

示例8: IsWithinFailsWhenOutsidePathUsingStringPath

 public void IsWithinFailsWhenOutsidePathUsingStringPath()
 {
     using (TestDirectory td = new TestDirectory("ParentDirectory", true))
     {
         DirectoryAssert.IsWithin(td.directoryName, Environment.SpecialFolder.System.ToString());
     }
 }
開發者ID:Phaiax,項目名稱:dotnetautoupdate,代碼行數:7,代碼來源:DirectoryAssertTests.cs

示例9: AreNotEqualPassesIfOneIsNull

 public void AreNotEqualPassesIfOneIsNull()
 {
     using (TestDirectory td = new TestDirectory("ParentDirectory"))
     {
         DirectoryAssert.AreNotEqual(td.directoryInformation, null);
     }
 }
開發者ID:Phaiax,項目名稱:dotnetautoupdate,代碼行數:7,代碼來源:DirectoryAssertTests.cs

示例10: IsNotEmptyPassesWithNonEmptyDirectoryUsingStringPath

 public void IsNotEmptyPassesWithNonEmptyDirectoryUsingStringPath()
 {
     using (TestDirectory td = new TestDirectory("ParentDirectory", true))
     {
         DirectoryAssert.IsNotEmpty(td.directoryName);
     }
 }
開發者ID:Phaiax,項目名稱:dotnetautoupdate,代碼行數:7,代碼來源:DirectoryAssertTests.cs

示例11: IsNotEmptyPassesWithNonEmptyDirectoryUsingDirectoryInfo

 public void IsNotEmptyPassesWithNonEmptyDirectoryUsingDirectoryInfo()
 {
     using (TestDirectory td = new TestDirectory("ParentDirectory", true))
     {
         DirectoryAssert.IsNotEmpty(td.directoryInformation);
     }
 }
開發者ID:Phaiax,項目名稱:dotnetautoupdate,代碼行數:7,代碼來源:DirectoryAssertTests.cs

示例12: IsNotEmptyFailsWithInvalidDirectory

 public void IsNotEmptyFailsWithInvalidDirectory()
 {
     using (TestDirectory td = new TestDirectory("ParentDirectory", false))
     {
         DirectoryAssert.IsNotEmpty(td.directoryName + "INVALID");
     }
 }
開發者ID:Phaiax,項目名稱:dotnetautoupdate,代碼行數:7,代碼來源:DirectoryAssertTests.cs

示例13: IsNotEmptyFailsWithEmptyDirectoryUsingStringPath

 public void IsNotEmptyFailsWithEmptyDirectoryUsingStringPath()
 {
     using (TestDirectory td = new TestDirectory("ParentDirectory", false))
     {
         DirectoryAssert.IsNotEmpty(td.directoryName);
     }
 }
開發者ID:Phaiax,項目名稱:dotnetautoupdate,代碼行數:7,代碼來源:DirectoryAssertTests.cs

示例14: IsNotEmptyFailsWithEmptyDirectoryUsingDirectoryInfo

 public void IsNotEmptyFailsWithEmptyDirectoryUsingDirectoryInfo()
 {
     using (TestDirectory td = new TestDirectory("ParentDirectory", false))
     {
         DirectoryAssert.IsNotEmpty(td.directoryInformation);
     }
 }
開發者ID:Phaiax,項目名稱:dotnetautoupdate,代碼行數:7,代碼來源:DirectoryAssertTests.cs

示例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);
     }
 }
開發者ID:Phaiax,項目名稱:dotnetautoupdate,代碼行數:8,代碼來源:DirectoryAssertTests.cs


注:本文中的NUnit.Framework.Tests.TestDirectory類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。