Template
61 lines
3.2 KiB
C#
61 lines
3.2 KiB
C#
using Strata.DecisionSupport.Biz.Parameters;
|
|
using Strata.DecisionSupport.Biz.Services;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using VerifyNUnit;
|
|
|
|
namespace Strata.DecisionSupport.Biz.Test.Unit.Services
|
|
{
|
|
[TestFixture, Category("Unit"), Category("DSS")]
|
|
public class VariationEncounterChargeQueryTests : EncounterQueryServiceTests
|
|
{
|
|
|
|
[TestCaseSource(nameof(VariationEncounterChargeQueryTestCaseDetails))]
|
|
public async Task VariationEncounterChargeQueryTest(bool hasManufacturerClientDSS, bool isManufacturerInferred,
|
|
bool hasSupplyClientDSS, bool isSupplyInferred, bool isUsingCustomEntityDimension,
|
|
bool hasChargeCodeIds)
|
|
{
|
|
var queryInfo = new VariationEncounterChargeQueryInfo(hasManufacturerClientDSS, isManufacturerInferred,
|
|
hasSupplyClientDSS, isSupplyInferred, isUsingCustomEntityDimension, true,
|
|
new Guid[] { },
|
|
hasChargeCodeIds ? new int[] { 1, 2 } : new int[] { },
|
|
1, 1000);
|
|
var query = EncounterQueries.VariationEncounterChargeQuery(queryInfo.First, queryInfo.Rows, queryInfo.Args());
|
|
await Verifier.Verify(query, verifySettings)
|
|
.UseFileName(TestContext.CurrentContext.TestName());
|
|
}
|
|
|
|
public static IEnumerable<TestCaseData> VariationEncounterChargeQueryTestCaseDetails()
|
|
{
|
|
yield return new TestCaseData(true, true, true, true, true, true).SetName("{m} (1)");
|
|
yield return new TestCaseData(false, false, true, true, true, true).SetName("{m} (2)");
|
|
yield return new TestCaseData(true, true, false, false, true, true).SetName("{m} (3)");
|
|
yield return new TestCaseData(false, false, false, false, true, false).SetName("{m} (4)");
|
|
}
|
|
|
|
[TestCaseSource(nameof(VariationEncounterChargeQueryTestCases))]
|
|
public async Task VariationEncounterChargeQueryTestFromCases(VariationEncounterChargeQueryInfo queryInfo)
|
|
{
|
|
var query = EncounterQueries.VariationEncounterChargeQuery(queryInfo.First, queryInfo.Rows, queryInfo.Args());
|
|
await Verifier.Verify(query, verifySettings)
|
|
.UseFileName(TestContext.CurrentContext.TestName());
|
|
}
|
|
|
|
public static IEnumerable<TestCaseData> VariationEncounterChargeQueryTestCases()
|
|
{
|
|
yield return new TestCaseData(new VariationEncounterChargeQueryInfo(true, true, true, true, true, true,
|
|
new Guid[] { }, new int[] { },
|
|
1, 1000)).SetName("{m} (1)");
|
|
yield return new TestCaseData(new VariationEncounterChargeQueryInfo(false, false, false, false, false, false,
|
|
new Guid[] { }, new int[] { 1, 2 },
|
|
1, 1000)).SetName("{m} (2)");
|
|
yield return new TestCaseData(new VariationEncounterChargeQueryInfo(true, true, true, true, true, true,
|
|
new Guid[] { }, new int[] { },
|
|
1, 1000)).SetName("{m} (3)");
|
|
yield return new TestCaseData(new VariationEncounterChargeQueryInfo(false, false, false, false, false, false,
|
|
new Guid[] { }, new int[] { 1, 2 },
|
|
1, 1000)).SetName("{m} (4)");
|
|
}
|
|
}
|
|
} |