IGitTfsRemote: remove setter for property TfsRepositoryPath

The setter is not used and during the lifetime of the object the property
value shouldn't be changed. Remove it.
This commit is contained in:
Peter Baumann
2021-11-03 19:56:10 +01:00
committed by siprbaum
parent 5b5ef0c79f
commit 39fc6cfc8c
4 changed files with 5 additions and 6 deletions
-1
View File
@@ -74,7 +74,6 @@ namespace GitTfs.Core
public string TfsRepositoryPath
{
get { return _tfsRepositoryPath; }
set { throw DerivedRemoteException; }
}
public string[] TfsSubtreePaths
+1 -1
View File
@@ -133,7 +133,7 @@ namespace GitTfs.Core
set { Tfs.Password = value; }
}
public string TfsRepositoryPath { get; set; }
public string TfsRepositoryPath { get; }
/// <summary>
/// Gets the TFS server-side paths of all subtrees of this remote.
+1 -1
View File
@@ -32,7 +32,7 @@ namespace GitTfs.Core
RemoteInfo RemoteInfo { get; }
string Id { get; }
string TfsUrl { get; set; }
string TfsRepositoryPath { get; set; }
string TfsRepositoryPath { get; }
/// <summary>
/// Gets the TFS server-side paths of all subtrees of this remote.
/// Valid if the remote has subtrees, which occurs when <see cref="TfsRepositoryPath"/> is null.
+3 -3
View File
@@ -44,7 +44,7 @@ namespace GitTfs.Test.Commands
var trunkGitTfsRemote = trunkGitTfsRemoteMock.Object;
trunkGitTfsRemote.TfsUsername = "user";
trunkGitTfsRemote.TfsPassword = "pwd";
trunkGitTfsRemote.TfsRepositoryPath = "$/MyProject/Trunk";
trunkGitTfsRemoteMock.SetupGet(x => x.TfsRepositoryPath).Returns("$/MyProject/Trunk");
trunkGitTfsRemote.TfsUrl = "http://myTfsServer:8080/tfs";
newBranchRemoteMock = Mock.Get(mocks.Get<IGitTfsRemote>()).SetupAllProperties();
@@ -115,7 +115,7 @@ namespace GitTfs.Test.Commands
IGitTfsRemote existingBranchRemote = gitTfsRemoteMock.Object;
existingBranchRemote.TfsUsername = "user";
existingBranchRemote.TfsPassword = "pwd";
existingBranchRemote.TfsRepositoryPath = "$/MyProject/MyBranch";
gitTfsRemoteMock.SetupGet(x => x.TfsRepositoryPath).Returns("$/MyProject/MyBranch");
existingBranchRemote.TfsUrl = "http://myTfsServer:8080/tfs";
gitRepository.Name = nameof(gitRepository);
@@ -366,7 +366,7 @@ namespace GitTfs.Test.Commands
var remote = remoteMock.Object;
remote.TfsUsername = "user";
remote.TfsPassword = "pwd";
remote.TfsRepositoryPath = "$/MyProject/Trunk";
remoteMock.SetupGet(x => x.TfsRepositoryPath).Returns("$/MyProject/Trunk");
remote.TfsUrl = "http://myTfsServer:8080/tfs";
remoteMock.SetupGet(x => x.Tfs).Returns(new TfsHelper(mocks.Container, null));