Skip to content

Commit

Permalink
Update DefaultParameterUniqueReferences - 424233
Browse files Browse the repository at this point in the history
  • Loading branch information
udaydefra committed Aug 9, 2024
1 parent 509c19b commit 7f7c205
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 37 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using api.Mappers;
using EPR.Calculator.API.Constants;
using EPR.Calculator.API.Dtos;
using EPR.Calculator.API.UnitTests.Moq;
using Microsoft.AspNetCore.Mvc;
using Microsoft.VisualStudio.TestTools.UnitTesting;

Expand Down Expand Up @@ -33,7 +32,7 @@ public void Check_TheResult_IsNotNullOf_ResultSet_WithDefaultSchemeParametersDto
public ObjectResult DataPostCall()
{
var schemeParameterTemplateValues = new List<SchemeParameterTemplateValueDto>();
foreach (var item in CreateDefaultParameterMoqData._uniqueReferences)
foreach (var item in DefaultParameterUniqueReferences.UniqueReferences)
{
if (item == "MATT-PD" || item == "TONT-PD")
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
using EPR.Calculator.API.Constants;
using EPR.Calculator.API.Dtos;
using EPR.Calculator.API.Validators;
using Microsoft.AspNetCore.Mvc;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using EPR.Calculator.API.UnitTests.Moq;
using EPR.Calculator.API.Validators;
using Microsoft.IdentityModel.Tokens;
using Microsoft.AspNetCore.Http;
using EPR.Calculator.API.Constants;

namespace api.Tests.Controllers
{
Expand Down Expand Up @@ -108,7 +105,7 @@ public void GetSchemeParameter_Return_400_Error_WithN_No_YearSupplied()
public ObjectResult DataPostCall()
{
var schemeParameterTemplateValues = new List<SchemeParameterTemplateValueDto>();
foreach (var item in CreateDefaultParameterMoqData._uniqueReferences)
foreach (var item in DefaultParameterUniqueReferences.UniqueReferences)
{
if (item == "MATT-PD" || item == "TONT-PD")
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@ namespace EPR.Calculator.API.UnitTests
[TestClass]
public class DefaultParameterSettingControllerValidationTest : BaseControllerTest
{
private static string[] _uniqueReferences = {"BADEBT-P", "COMC-AL", "COMC-FC", "COMC-GL",
"COMC-OT", "COMC-PC", "COMC-PL", "COMC-ST",
"COMC-WD", "LAPC-ENG","LAPC-NIR", "LAPC-SCT",
"LAPC-WLS", "LEVY-ENG", "LEVY-NIR", "LEVY-SCT", "LEVY-WLS",
"LRET-AL", "LRET-FC", "LRET-GL", "LRET-OT",
"LRET-PC", "LRET-PL", "LRET-ST", "LRET-WD", "MATT-AD",
"MATT-AI", "MATT-PD", "MATT-PI", "SAOC-ENG", "SAOC-NIR",
"SAOC-SCT", "SAOC-WLS", "SCSC-ENG","SCSC-NIR", "SCSC-SCT",
"SCSC-WLS", "TONT-AI", "TONT-AD", "TONT-PD","TONT-PI" };

[TestMethod]
public void InvalidTest_With_NoRecords()
{
Expand Down Expand Up @@ -63,7 +53,7 @@ public void InvalidTest_With_Invalid_Data()
public void InvalidTest_With_Missing_Data()
{
var schemeParameterTemplateValues = new List<SchemeParameterTemplateValueDto>();
foreach (var uniqueRef in _uniqueReferences)
foreach (var uniqueRef in DefaultParameterUniqueReferences.UniqueReferences)
{
schemeParameterTemplateValues.Add(new SchemeParameterTemplateValueDto
{
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

namespace EPR.Calculator.API.Constants
{
public static class DefaultParameterUniqueReferences
{
public static string[] UniqueReferences = {"BADEBT-P", "COMC-AL", "COMC-FC", "COMC-GL",
"COMC-OT", "COMC-PC", "COMC-PL", "COMC-ST",
"COMC-WD", "LAPC-ENG", "LAPC-NIR", "LAPC-SCT", "LAPC-WLS",
"LEVY-ENG", "LEVY-NIR", "LEVY-SCT", "LEVY-WLS",
"LRET-AL", "LRET-FC", "LRET-GL", "LRET-OT", "LRET-PC",
"LRET-PL", "LRET-ST", "LRET-WD","MATT-AD", "MATT-AI",
"MATT-PD", "MATT-PI", "SAOC-ENG", "SAOC-NIR",
"SAOC-SCT","SAOC-WLS","SCSC-ENG","SCSC-NIR",
"SCSC-SCT","SCSC-WLS","TONT-AD","TONT-AI",
"TONT-PD","TONT-PI"};
}
}

0 comments on commit 7f7c205

Please sign in to comment.