Refactor pacserver
This commit is contained in:
@ -4,10 +4,15 @@ namespace Pacserver.Tests;
|
||||
|
||||
public class TranserFilesTest {
|
||||
[Fact]
|
||||
public void TransferPacmanCacheTest() {
|
||||
string result = PacserverUtils.determinePacmanCacheDirectory();
|
||||
PacserverUtils.TransferPacmanCache();
|
||||
public void transferPacmanCache_doesNotFail() {
|
||||
// Arrange
|
||||
PacserverUtils utils = new PacserverUtils();
|
||||
|
||||
// Act
|
||||
utils.readPacmanConfig();
|
||||
utils.transferPacmanCache();
|
||||
|
||||
// Assert
|
||||
//Assert.NotEmpty(Directory.GetFiles("/home/rene/test/"));
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +0,0 @@
|
||||
using Pacserver.Utils;
|
||||
|
||||
namespace Pacserver.Tests;
|
||||
|
||||
public class pacmanCache_Test {
|
||||
[Fact]
|
||||
public void doesPacmanCacheExist() {
|
||||
string result = PacserverUtils.determinePacmanCacheDirectory();
|
||||
|
||||
Assert.Equivalent(result, "/var/cache/pacman/pkg/");
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
using Pacserver.Utils;
|
||||
|
||||
namespace Pacserver.Tests;
|
||||
|
||||
public class pacmanDatabase_Test {
|
||||
[Fact]
|
||||
public void doesPacmanDatabaseExist() {
|
||||
string result = PacserverUtils.determinePacmanDatabaseDirectory();
|
||||
|
||||
Assert.Equivalent(result, "/var/lib/pacman/");
|
||||
}
|
||||
}
|
18
src/Pacserver.Tests/readPacmanConfigTest.cs
Normal file
18
src/Pacserver.Tests/readPacmanConfigTest.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using Pacserver.Utils;
|
||||
|
||||
namespace Pacserver.Tests;
|
||||
|
||||
public class readPacmanConfigTest {
|
||||
[Fact]
|
||||
public void readPacmanConfig_returnsNoException() {
|
||||
// Arrange
|
||||
PacserverUtils utils = new PacserverUtils();
|
||||
|
||||
// Act
|
||||
var exception = Record.Exception(() => utils.readPacmanConfig());
|
||||
|
||||
// Assert
|
||||
Assert.Null(exception);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user