Template
39 lines
977 B
C#
39 lines
977 B
C#
using Snowflake.Data.Client;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace Strata.DecisionSupport.Biz.Test.Integration.IntegrationTests
|
|
{
|
|
[ExcludeFromCodeCoverage]
|
|
[TestFixture, Category("Integration"), Category("DSS")]
|
|
public class TestException : IntegrationTestBase
|
|
{
|
|
|
|
[Test]
|
|
public async Task ExceptionTest()
|
|
{
|
|
var query = "select ISNULL(null, 0) id\r\n";
|
|
try
|
|
{
|
|
var result = await _databaseContext.QueryAsync<TestClass>(query, nameof(ExceptionTest));
|
|
}
|
|
catch (SnowflakeDbException dbex)
|
|
{
|
|
await Verifier.Verify(dbex.Message, verifySettings)
|
|
.UseFileName(TestContext.CurrentContext.TestName());
|
|
}
|
|
catch (Exception)
|
|
{
|
|
|
|
throw;
|
|
}
|
|
}
|
|
|
|
public class TestClass
|
|
{
|
|
public int Id { get; set; }
|
|
}
|
|
|
|
}
|
|
|
|
}
|