8000 Remove RepositoryHost(s) by grokys · Pull Request #1283 · github/VisualStudio · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Remove RepositoryHost(s) #1283

Merged
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix failing tests.
  • Loading branch information
grokys committed Oct 26, 2017
commit 9db05a73139d354bb8246739c03c92cf3ce04cba
12 changes: 10 additions & 2 deletions src/UnitTests/GitHub.App/Models/RepositoryHostsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ static IConnectionManager CreateConnectionManager(params HostAddress[] hostAddre

result.Connections.Returns(connections);

result.LogIn(null, null, null).ReturnsForAnyArgs(x =>
Func<NSubstitute.Core.CallInfo, Task<IConnection>> login = async x =>
{
var hostAddress = x.Arg<HostAddress>();

Expand All @@ -167,9 +167,17 @@ static IConnectionManager CreateConnectionManager(params HostAddress[] hostAddre
x.ArgAt<string>(1),
null,
null);

if (result.ConnectionCreated != null)
{
await result.ConnectionCreated(connection);
}

connections.Add(connection);
return connection;
});
};

result.LogIn(null, null, null).ReturnsForAnyArgs(login);

result.LogOut(null).ReturnsForAnyArgs(x =>
{
Expand Down
0