Skip to content

Commit 2293afb

Browse files
committed
Fixed tests and renaming
1 parent aa676d5 commit 2293afb

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

tests/MongoDB.Driver.Tests/Core/Connections/Socks5ProxySettingsConnectionTest.cs renamed to tests/MongoDB.Driver.Tests/Core/Connections/Socks5ProxySettingsTest.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
namespace MongoDB.Driver.Core.Connections;
2121

22-
public class Socks5ProxySettingsConnectionTest
22+
public class Socks5ProxySettingsTest
2323
{
2424
[Fact]
2525
public void Constructor_should_set_properties_correctly_with_host_only()
@@ -99,17 +99,16 @@ public void Equals_and_GetHashCode_should_work_for_Socks5ProxySettings()
9999
public void ToString_should_return_expected_string_for_no_auth()
100100
{
101101
var s = new Socks5ProxySettings("host");
102-
s.ToString().Should().Contain("Host : host").And.Contain("Port : 1080").And.Contain("Authentication : None");
102+
var expected = "{ Host : host, Port : 1080, Authentication : None }";
103+
s.ToString().Should().Be(expected);
103104
}
104105

105106
[Fact]
106107
public void ToString_should_return_expected_string_for_username_password_auth()
107108
{
108109
var s = new Socks5ProxySettings("host", 1234, Socks5AuthenticationSettings.UsernamePassword("u", "p"));
109-
s.ToString().Should().Contain("Host : host")
110-
.And.Contain("Port : 1234")
111-
.And.Contain("Username: u")
112-
.And.Contain("Password: p");
110+
var expected = "{ Host : host, Port : 1234, Authentication : UsernamePassword (Username: u, Password: p) }";
111+
s.ToString().Should().Be(expected);
113112
}
114113

115114
[Fact]

0 commit comments

Comments
 (0)