public void DatabaseHandler_IDatabaseConnectionFactory_Constructor() { var connectionFactory = new MsSqlConnectionFactory(null); var db = new DatabaseHandler(connectionFactory); Assert.NotNull(db); Assert.Equal(connectionFactory, db.ConnectionFactory); }
public void GetReadConnection() { var factory = new MsSqlConnectionFactory(new ConnectionFactoryOptions <MsSqlConnectionOptions> { Read = new MsSqlConnectionOptions() }); var readConn = factory.GetReadConnection(); Assert.NotNull(readConn); }
public void GetWriteConnection() { var factory = new MsSqlConnectionFactory(new ConnectionFactoryOptions <MsSqlConnectionOptions> { Write = new MsSqlConnectionOptions() }); var writeConn = factory.GetWriteConnection(); Assert.NotNull(writeConn); }