forked from acken/AutoTest.Net
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProjectFileCrawlerTest.cs
More file actions
38 lines (34 loc) · 1.09 KB
/
Copy pathProjectFileCrawlerTest.cs
File metadata and controls
38 lines (34 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using AutoTest.Core.FileSystem;
using NUnit.Framework;
using System.IO;
using System.Linq;
namespace AutoTest.Test.Core
{
[TestFixture]
public class ProjectFileCrawlerTest
{
private string _path;
private ProjectFileCrawler _fileCrawler;
[SetUp]
public void SetUp()
{
_path = Path.GetFullPath(Path.Combine("TestResources", "VS2008"));
_fileCrawler = new ProjectFileCrawler();
}
[Test]
public void Should_find_dlls_two_steps_down()
{
var dlls = _fileCrawler.FindParent(_path, ".config");
// Does a foreach since it's 1 in visual studio and 2 in monodevelop
// The important part is that all fetched are .config files
foreach (var dll in dlls)
dll.Extension.ShouldEqual(".config");
}
[Test]
public void Should_return_null_if_no_fiels_found()
{
var files = _fileCrawler.FindParent(_path, ".ImPrettySureThisExtensionIsUnexistingOnThisSystem");
files.Length.ShouldEqual(0);
}
}
}