Template
chore: deploy initial code base
This commit is contained in:
+93
@@ -0,0 +1,93 @@
|
||||
using Snowflake.Data.Client;
|
||||
using Strata.DecisionSupport.Biz.Encounters;
|
||||
using Strata.DecisionSupport.Biz.Parameters;
|
||||
using Strata.DecisionSupport.Biz.Services;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Strata.DecisionSupport.Biz.Test.Integration.IntegrationTests
|
||||
{
|
||||
[ExcludeFromCodeCoverage]
|
||||
[TestFixture, Category("Integration"), Category("DSS")]
|
||||
public class TestEncounterChargeQuery : IntegrationTestBase
|
||||
{
|
||||
|
||||
[TestCaseSource(nameof(EncounterChargeQueryTestCases))]
|
||||
public async Task EncounterChargeQueryTest(EncounterChargeQueryInfo queryInfo)
|
||||
{
|
||||
var query = EncounterQueries.EncounterChargeQuery(queryInfo.First, queryInfo.Rows, queryInfo.Args());
|
||||
try
|
||||
{
|
||||
var result = ((IEnumerable<EncounterChargeInfo>)(await _databaseContext
|
||||
.QueryAsync<EncounterChargeInfo>(query, nameof(EncounterChargeQueryTest), queryInfo.Parameters())));
|
||||
await Verifier.Verify(query, verifySettings)
|
||||
.UseFileName(TestContext.CurrentContext.TestName(nameof(query)));
|
||||
await Verifier.Verify(result, verifySettings)
|
||||
.UseFileName(TestContext.CurrentContext.TestName(nameof(result)));
|
||||
}
|
||||
catch (SnowflakeDbException dbex)
|
||||
{
|
||||
// ILB
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[TestCaseSource(nameof(EncounterChargeQueryTestCases))]
|
||||
public async Task EncounterChargeQueryServiceTest(EncounterChargeQueryInfo queryInfo)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = await _encounterQueryService.RunEncounterChargeQuery(queryInfo, CancellationToken.None);
|
||||
await Verifier.Verify(result, verifySettings)
|
||||
.UseFileName(TestContext.CurrentContext.TestName(nameof(result)));
|
||||
}
|
||||
catch (SnowflakeDbException dbex)
|
||||
{
|
||||
// ILB
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable<TestCaseData> EncounterChargeQueryTestCases()
|
||||
{
|
||||
yield return new TestCaseData(new EncounterChargeQueryInfo(
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
Guid.NewGuid(),
|
||||
[1]))
|
||||
.SetName("{m}");
|
||||
yield return new TestCaseData(new EncounterChargeQueryInfo(
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
Guid.NewGuid(),
|
||||
[1]))
|
||||
.SetName("{m} hasManufacturer hasSupply usingCustomDimension");
|
||||
yield return new TestCaseData(new EncounterChargeQueryInfo(
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
Guid.NewGuid(),
|
||||
[1]))
|
||||
.SetName("{m} hasManufacturer Inferred hasSupply Inferred usingCustomDimension");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user