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:
@@ -74,7 +74,6 @@ namespace GitTfs.Core
|
||||
public string TfsRepositoryPath
|
||||
{
|
||||
get { return _tfsRepositoryPath; }
|
||||
set { throw DerivedRemoteException; }
|
||||
}
|
||||
|
||||
public string[] TfsSubtreePaths
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user