forked from fluentcassandra/fluentcassandra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConnectionProviderTests.cs
41 lines (34 loc) · 986 Bytes
/
ConnectionProviderTests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using System.Linq;
using Xunit;
using System.Configuration;
namespace FluentCassandra.Connections
{
public class ConnectionProviderTests
{
[Fact]
public void NormalConnectionProvider()
{
// arrange
var expected = typeof(NormalConnectionProvider);
var connectionString = "Keyspace=" + ConfigurationManager.AppSettings["TestKeySpace"];
// act
var result = new ConnectionBuilder(connectionString);
var actual = ConnectionProviderFactory.Get(result).GetType();
// assert
Assert.Equal(expected, actual);
}
[Fact]
public void PooledConnectionProvider()
{
// arrange
var expected = typeof(PooledConnectionProvider);
var connectionString = "Keyspace=" + ConfigurationManager.AppSettings["TestKeySpace"] + ";Pooling=True";
// act
var result = new ConnectionBuilder(connectionString);
var actual = ConnectionProviderFactory.Get(result).GetType();
// assert
Assert.Equal(expected, actual);
}
}
}