internal void TryGetIntegrationDetails_CorrectNameGenerated(IDbCommand command, string expectedIntegrationName, string expectedDbType) { bool result = DbScopeFactory.TryGetIntegrationDetails(command.GetType().FullName, out var actualIntegrationId, out var actualDbType); Assert.True(result); Assert.Equal(expectedIntegrationName, actualIntegrationId.ToString()); Assert.Equal(expectedDbType, actualDbType); }
internal void TryGetIntegrationDetails_FailsForKnownCommandType() { bool result = DbScopeFactory.TryGetIntegrationDetails("InterceptableDbCommand", out var actualIntegrationId, out var actualDbType); Assert.False(result); Assert.False(actualIntegrationId.HasValue); Assert.Null(actualDbType); bool result2 = DbScopeFactory.TryGetIntegrationDetails("ProfiledDbCommand", out var actualIntegrationId2, out var actualDbType2); Assert.False(result2); Assert.False(actualIntegrationId2.HasValue); Assert.Null(actualDbType2); }
internal void TryGetIntegrationDetails_CustomCommandType(string commandTypeFullName, string integrationId, string expectedDbType) { DbScopeFactory.TryGetIntegrationDetails(commandTypeFullName, out var actualIntegrationId, out var actualDbType); Assert.Equal(integrationId, actualIntegrationId?.ToString()); Assert.Equal(expectedDbType, actualDbType); }
public DbScopeConfigTests() { _scopeFactory = new DbScopeFactory(); }
public ConnectionScopeTests() { _scopeFactory = new DbScopeFactory(); }
public DbScopeFactoryTests() { _scopeFactory = new DbScopeFactory(); }
public TransactionScopeTests() { _scopeFactory = new DbScopeFactory(); }