Ejemplo n.º 1
0
 public void CreateDirectorySyncTest()
 {
     _fileSystem.Setup(x => x.GetFiles("directoryPath", "*.csproj", SearchOption.AllDirectories))
         .Returns(new[] {"file1.csproj", "file2.csproj"});
     _validator.Setup(x => x.IsDirectoryValid("file1.csproj")).Returns(true);
     _validator.Setup(x => x.IsDirectoryValid("file2.csproj")).Returns(true);
     _projectFactory.Setup(x => x.IsValidProject("file1.csproj")).Returns(true);
     _projectFactory.Setup(x => x.IsValidProject("file2.csproj")).Returns(true);
     var factory = new SyncFactory(_projectFactory.Object, _console.Object, _fileSystem.Object, _validator.Object);
     var sync = factory.CreateDirectorySynchronizer("directoryPath");
     Assert.IsNotNull(sync);
 }
Ejemplo n.º 2
0
 public void CreateProjecSyncTest()
 {
     var factory = new SyncFactory(_projectFactory.Object, _console.Object, _fileSystem.Object, _validator.Object);
     var sync = factory.CreateProjectSynchronizer("filePath");
     Assert.IsNotNull(sync);
 }