Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
 public DbScopeConfigTests()
 {
     _scopeFactory = new DbScopeFactory();
 }
Ejemplo n.º 5
0
 public ConnectionScopeTests()
 {
     _scopeFactory = new DbScopeFactory();
 }
Ejemplo n.º 6
0
 public DbScopeFactoryTests()
 {
     _scopeFactory = new DbScopeFactory();
 }
Ejemplo n.º 7
0
 public TransactionScopeTests()
 {
     _scopeFactory = new DbScopeFactory();
 }