Permalink
Browse files

Renamed LoadBalancerServerManager to be SingleServerManager.

--Second commit to include project file updates.
  • Loading branch information...
1 parent daaa3de commit a4f85cdaec2801b78d012442b681803a881d372c @nathannis nathannis committed Jan 24, 2013
@@ -11,7 +11,7 @@ public abstract class ConnectionProvider : IConnectionProvider
protected ConnectionProvider(IConnectionBuilder builder)
{
ConnectionBuilder = builder;
- Servers = new LoadBalancerServerManager(builder);
+ Servers = new SingleServerManager(builder);
}
/// <summary>
@@ -6,12 +6,12 @@
namespace FluentCassandra.Connections
{
- public class LoadBalancerServerManager : IServerManager
+ public class SingleServerManager : IServerManager
{
private readonly object _lock = new object();
private Server _server;
- public LoadBalancerServerManager(IConnectionBuilder builder)
+ public SingleServerManager(IConnectionBuilder builder)
{
_server = builder.Servers[0];
}
@@ -39,14 +39,14 @@ public void Add(Server server)
}
public void Remove(Server server)
{
- throw new NotImplementedException ("LoadBalancerServerManager does not implement Remove(server)");
+ throw new NotImplementedException ("SingleServerManager does not implement Remove(server)");
}
#endregion
#region IEnumerable<Server> Members
public IEnumerator<Server> GetEnumerator()
{
- throw new NotImplementedException ("LoadBalancerServerManager does not implement Enumerable(server)");
+ throw new NotImplementedException("SingleServerManager does not implement Enumerable(server)");
}
#endregion
@@ -114,7 +114,7 @@
<Compile Include="Connections\ConnectionType.cs" />
<Compile Include="Connections\CqlVersion.cs" />
<Compile Include="Connections\IConnectionBuilder.cs" />
- <Compile Include="Connections\LoadBalancerServerManager.cs" />
+ <Compile Include="Connections\SingleServerManager.cs" />
<Compile Include="Connections\NormalConnectionProvider.cs" />
<Compile Include="Connections\IConnection.cs" />
<Compile Include="Connections\IConnectionProvider.cs" />
@@ -4,21 +4,21 @@
namespace FluentCassandra.Connections.Tests
{
- public class LoadBalancerServerManagerTests
+ public class SingleServerManagerTests
{
[Fact]
public void CanGetServerAfterError()
{
- LoadBalancerServerManager target = new LoadBalancerServerManager(new ConnectionBuilder("Server=unit-test-1"));
+ SingleServerManager target = new SingleServerManager(new ConnectionBuilder("Server=unit-test-1"));
Server original = target.Next();
for (int i = 0; i < 10; i++)
{
- Assert.True(target.HasNext, "LoadBalancerServerManager should always have another server available.");
+ Assert.True(target.HasNext, "SingleServerManager should always have another server available.");
Server next = target.Next();
Assert.True(original.ToString().Equals(next.ToString(), StringComparison.OrdinalIgnoreCase),
- "LoadBalancerServerManager always returns the same server.");
+ "SingleServerManager always returns the same server.");
//mark the server as failing to set up the next test iteration.
target.ErrorOccurred(next);
}
@@ -61,7 +61,7 @@
<Compile Include="CassandraQueryTest.cs" />
<Compile Include="Connections\ConnectionBuilderTests.cs" />
<Compile Include="Connections\ConnectionProviderTests.cs" />
- <Compile Include="Connections\LoadBalancerServerManagerTests.cs" />
+ <Compile Include="Connections\SingleServerManagerTests.cs" />
<Compile Include="Connections\NormalConnectionProviderTests.cs" />
<Compile Include="Connections\RoundRobinServerManagerTests.cs" />
<Compile Include="CqlHelperTest.cs" />

0 comments on commit a4f85cd

Please sign in to comment.