36 lines
No EOL
1,003 B
C#
36 lines
No EOL
1,003 B
C#
using System.Text;
|
|
using ModuleCore.Calendar;
|
|
using ModuleCore.Git;
|
|
using ModuleTests.Git.TestData;
|
|
|
|
namespace ModuleTests.Git;
|
|
|
|
public class AddRegistrationTests
|
|
{
|
|
private static readonly VerifySettings Settings;
|
|
|
|
static AddRegistrationTests()
|
|
{
|
|
Settings = new VerifySettings();
|
|
var testBaseDirectory = Path.Join(TestConstants.SnapshotFolderName, nameof(AddRegistrationTests));
|
|
|
|
Settings.UseDirectory(testBaseDirectory);
|
|
Settings.DisableDiff();
|
|
}
|
|
|
|
[Theory]
|
|
[ClassData(typeof(AddRegistrationTestData))]
|
|
public Task BasicRepoRegistration((int testId, string path) testData)
|
|
{
|
|
Settings.UseFileName($"{nameof(BasicRepoRegistration)}_{testData.testId}");
|
|
|
|
var gitManager = GitManager.InternalFreshInstance;
|
|
|
|
var repoRegistration = gitManager.RegisterRepo("Test:/some/test/repo", testData.path);
|
|
var sb = new StringBuilder();
|
|
sb.AppendLine($"Attempted to register: {testData.path}")
|
|
.AppendLine($"Registration result: {repoRegistration}");
|
|
|
|
return Verify(sb, Settings);
|
|
}
|
|
} |