本文整理匯總了C#中System.IO.FileSystem.ShouldHaveTheSameElementsAs方法的典型用法代碼示例。如果您正苦於以下問題:C# FileSystem.ShouldHaveTheSameElementsAs方法的具體用法?C# FileSystem.ShouldHaveTheSameElementsAs怎麽用?C# FileSystem.ShouldHaveTheSameElementsAs使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.IO.FileSystem
的用法示例。
在下文中一共展示了FileSystem.ShouldHaveTheSameElementsAs方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: read_and_write_a_solution_with_projects
public void read_and_write_a_solution_with_projects()
{
var solution = Solution.LoadFrom("FubuMVC.SlickGrid.sln");
solution.Save("fake.sln");
var original =
new FileSystem().ReadStringFromFile("FubuMVC.SlickGrid.sln").Trim().SplitOnNewLine()
.Select(x => x.Replace('\\', '/'));
var newContent = new FileSystem().ReadStringFromFile("fake.sln").SplitOnNewLine().Select(x => x.Replace('\\', '/'));
newContent.Each(x => Debug.WriteLine(x));
newContent.ShouldHaveTheSameElementsAs(original);
}
示例2: write_a_solution
public void write_a_solution()
{
var solution = Solution.CreateNew(".".ToFullPath(), "foo");
solution.Save();
var original =
new FileSystem().ReadStringFromFile(
".".ToFullPath()
.ParentDirectory()
.ParentDirectory()
.ParentDirectory()
.AppendPath("FubuCsProjFile", "Solution.txt")).SplitOnNewLine();
var newContent = new FileSystem().ReadStringFromFile("foo.sln").SplitOnNewLine();
newContent.ShouldHaveTheSameElementsAs(original);
}