public async Task ShouldThrowOnImpersonatedUser() { var connection = SetupMockedConnection(); var boltProtocolV3 = new BoltProtocolV3(); //When var ex = await Assert.ThrowsAsync <ArgumentException>(() => boltProtocolV3.GetRoutingTable(connection, "myTestDatabase", string.Empty, null)); ex.Message.Should().Contain("3.0"); }
public async Task GetRoutingTableShouldThrowOnNullConnectionObject() { var v3 = new BoltProtocolV3(); var ex = await Xunit.Record.ExceptionAsync(async() => await v3.GetRoutingTable(null, "adb", null, null)); ex.Should().BeOfType <ProtocolException>().Which .Message.Should() .Contain("Attempting to get a routing table on a null connection"); }
public async Task RoutingTableShouldContainDatabase() { var connection = SetupMockedConnection(); var boltProtocolV3 = new BoltProtocolV3(); //When var routingTableDictionary = await boltProtocolV3.GetRoutingTable(connection, "myTestDatabase", null, null); //Then routingTableDictionary.ToDictionary().Should().ContainKey("db").WhichValue.Should().Be("myTestDatabase"); }