refactor(git-provider): Rename GitManager to GitRepoRegistrationManager
This commit is contained in:
parent
cece927b3f
commit
1804dd6e12
6 changed files with 25 additions and 25 deletions
|
|
@ -23,7 +23,7 @@ public class AddRegistrationTests
|
|||
public Task BasicRepoRegistration((int testId, string path) testData)
|
||||
{
|
||||
Settings.UseFileName($"{nameof(BasicRepoRegistration)}_{testData.testId}");
|
||||
var gitManager = GitManager.InternalFreshInstance(nameof(BasicRepoRegistration));
|
||||
var gitManager = GitRepoRegistrationManager.InternalFreshInstance(nameof(BasicRepoRegistration));
|
||||
|
||||
try
|
||||
{
|
||||
|
|
@ -44,7 +44,7 @@ public class AddRegistrationTests
|
|||
public void RepoRegistrationWithEmptyName()
|
||||
{
|
||||
Settings.UseFileName(nameof(RepoRegistrationWithEmptyName));
|
||||
var gitManager = GitManager.InternalFreshInstance(nameof(RepoRegistrationWithEmptyName));
|
||||
var gitManager = GitRepoRegistrationManager.InternalFreshInstance(nameof(RepoRegistrationWithEmptyName));
|
||||
var testRepoAbsolutePath = "Test:/some/test/repo";
|
||||
|
||||
try
|
||||
|
|
@ -63,7 +63,7 @@ public class AddRegistrationTests
|
|||
public void RepoRegistrationWithNullName()
|
||||
{
|
||||
Settings.UseFileName(nameof(RepoRegistrationWithNullName));
|
||||
var gitManager = GitManager.InternalFreshInstance(nameof(RepoRegistrationWithNullName));
|
||||
var gitManager = GitRepoRegistrationManager.InternalFreshInstance(nameof(RepoRegistrationWithNullName));
|
||||
var testRepoAbsolutePath = "Test:/some/test/repo";
|
||||
try
|
||||
{
|
||||
|
|
@ -84,7 +84,7 @@ public class AddRegistrationTests
|
|||
{
|
||||
Settings.UseFileName(nameof(RepoRegistrationWithWhitespaceName));
|
||||
|
||||
var gitManager = GitManager.InternalFreshInstance(nameof(RepoRegistrationWithWhitespaceName));
|
||||
var gitManager = GitRepoRegistrationManager.InternalFreshInstance(nameof(RepoRegistrationWithWhitespaceName));
|
||||
var testRepoAbsolutePath = "Test:/some/test/repo";
|
||||
try
|
||||
{
|
||||
|
|
@ -102,7 +102,7 @@ public class AddRegistrationTests
|
|||
public void DuplicateRepoRegistrationShouldFail()
|
||||
{
|
||||
Settings.UseFileName(nameof(RepoRegistrationWithWhitespaceName));
|
||||
var gitManager = GitManager.InternalFreshInstance(nameof(RepoRegistrationWithWhitespaceName));
|
||||
var gitManager = GitRepoRegistrationManager.InternalFreshInstance(nameof(RepoRegistrationWithWhitespaceName));
|
||||
var testRepoAbsolutePath = "Test:/some/test/repo";
|
||||
string[] paths = ["test", "nested", "path"];
|
||||
var names = (NormalSeparator: string.Join(Path.DirectorySeparatorChar, paths), AltSeparator: string.Join(Path.AltDirectorySeparatorChar, paths));
|
||||
|
|
@ -110,7 +110,6 @@ public class AddRegistrationTests
|
|||
try
|
||||
{
|
||||
var firstRegistration = gitManager.RegisterRepo(testRepoAbsolutePath, names.NormalSeparator);
|
||||
// TODO: make nested registrations fail in both directions and test
|
||||
var secondRegistration = gitManager.RegisterRepo(testRepoAbsolutePath, Path.Combine(paths[..1]));
|
||||
|
||||
Assert.Equal(Path.Combine(paths), firstRegistration);
|
||||
|
|
@ -128,7 +127,7 @@ public class AddRegistrationTests
|
|||
public void DuplicateRepoRegistrationDifferentSlashShouldNotFail()
|
||||
{
|
||||
Settings.UseFileName(nameof(RepoRegistrationWithWhitespaceName));
|
||||
var gitManager = GitManager.InternalFreshInstance(nameof(RepoRegistrationWithWhitespaceName));
|
||||
var gitManager = GitRepoRegistrationManager.InternalFreshInstance(nameof(RepoRegistrationWithWhitespaceName));
|
||||
var testRepoAbsolutePath = "Test:/some/test/repo";
|
||||
string[] paths = ["test", "nested", "path"];
|
||||
var names = (NormalSeparator: string.Join(Path.DirectorySeparatorChar, paths), AltSeparator: string.Join(Path.AltDirectorySeparatorChar, paths));
|
||||
|
|
@ -136,7 +135,6 @@ public class AddRegistrationTests
|
|||
try
|
||||
{
|
||||
var firstRegistration = gitManager.RegisterRepo(testRepoAbsolutePath, names.NormalSeparator);
|
||||
// TODO: make nested registrations fail in both directions and test
|
||||
var secondRegistration = gitManager.RegisterRepo(testRepoAbsolutePath, Path.Combine(paths[..1]));
|
||||
var differentPathSeparatorRegistration = gitManager.RegisterRepo(testRepoAbsolutePath, names.AltSeparator);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue