private async Task <CostStageRevision> SetupDistributionCost(string costTitle) { var cost = await CreateDistributionCostEntity(User, costTitle); var latestStage = await GetCostLatestStage(cost.Id, User); var latestRevision = await GetCostLatestRevision(cost.Id, latestStage.Id, User); await LedgerMaterialCodeService.UpdateLedgerMaterialCodes(latestRevision.Id); return(latestRevision); }
private async Task <CostStageRevision> SetupUsageCost(string costTitle, string usageType) { var cost = await CreateUsageCost(User, costTitle, usageType); var latestStage = await GetCostLatestStage(cost.Id, User); var latestRevision = await GetCostLatestRevision(cost.Id, latestStage.Id, User); await LedgerMaterialCodeService.UpdateLedgerMaterialCodes(latestRevision.Id); return(latestRevision); }
public async Task CheckSingleMgcCodes(string costTitle, string expectedMgCode, string expectedGlCode) { // Arrange var latestRevision = await SetupDistributionCost(costTitle); // Act var b = await LedgerMaterialCodeService.GetLedgerMaterialCodes(latestRevision.Id); // Assert b.Should().NotBeNull(); b.GlCode.Should().Be(expectedGlCode); b.MgCode.Should().Be(expectedMgCode); }