public void TestWithLoggerValidAndInvalidInputs() { QldbDriver driver; // Default logger driver = builder.Build(); Assert.IsNotNull(driver); // Null logger Assert.ThrowsException <ArgumentException>(() => builder.WithLogger(null)); driver = builder.WithLogger(NullLogger.Instance).Build(); Assert.IsNotNull(driver); }
public void TestWithPoolLimitArgumentBounds() { QldbDriver driver; // Default pool limit driver = builder.Build(); Assert.IsNotNull(driver); // Negative pool limit Assert.ThrowsException <ArgumentException>(() => builder.WithMaxConcurrentTransactions(-4)); driver = builder.WithMaxConcurrentTransactions(0).Build(); Assert.IsNotNull(driver); driver = builder.WithMaxConcurrentTransactions(4).Build(); Assert.IsNotNull(driver); }