public ProjectWatcherTests()
 {
     _project   = new Project(RelPath.FromString("Example.csproj"));
     _watcher   = new Mock <IFilesystemWatcher>(MockBehavior.Strict);
     _scheduler = new TestScheduler();
     _testee    = new ProjectWatcher(_project, _watcher.Object, _scheduler, new Mock <ILogger <ProjectWatcher> >().Object);
 }
        public void LoadsIslandProject()
        {
            var projectFilePath = RelPath.FromString("./Example.csproj");

            SetupLeafProject(projectFilePath);
            var project = _testee.Load(projectFilePath);

            project.Should().BeEquivalentTo(new Project(projectFilePath));
        }
Пример #3
0
        public void RelativeTo(string origin, string rel, string expected)
        {
            var originPath = RelPath.FromString(origin);

            var relativePath = RelPath.FromString(rel);

            var result = relativePath.RelativeTo(originPath);

            result.Path.Should().Be(expected);
        }
Пример #4
0
        public void FromString(string input, string expected)
        {
            var result = RelPath.FromString(input);

            result.Path.Should().Be(expected);
        }