public void GetPDFToTextExeFilename_ShouldReturnPdftotextExe_WhenItIsWindows() { // Arrange this.mockRuntimeInformation.Setup(x => x.GetOSPlatform()).Returns(OS.Windows); // Act var actual = DirectoryServiceFactory.GetDirectoryService(this.mockRuntimeInformation.Object); // Assert Assert.IsType <DirectoryServiceWindows>(actual); }
public void GetDirectoryService_ShouldReturnDirectoryServiceOSX_WhenItIsOSX() { // Arrange this.mockRuntimeInformation.Setup(x => x.GetOSPlatform()).Returns(OS.OSX); // Act var actual = DirectoryServiceFactory.GetDirectoryService(this.mockRuntimeInformation.Object); // Assert Assert.IsType <DirectoryServiceOSX>(actual); }
public void GetPDFToTextExeFilename_ShouldThrowAnException_WhenItIsOSX(OS os) { // Arrange this.mockRuntimeInformation.Setup(x => x.GetOSPlatform()).Returns(os); // Act Exception ex = Assert.Throws <ArgumentException>(() => DirectoryServiceFactory.GetDirectoryService(this.mockRuntimeInformation.Object)); // Assert string expected = "XpdfNet currently only supports Linux, Windows and OSX."; Assert.Equal(expected, ex.Message); }
public DirectoryApplication(Node localNode) { _localNode = localNode; _directoryService = DirectoryServiceFactory.Instance(Stage, localNode); }