diff --git a/Common/Production/ProductionUiCordonel.UnitTests/Features/ProductionProcessCheckProductionState.feature b/Common/Production/ProductionUiCordonel.UnitTests/Features/ProductionProcessCheckProductionState.feature
index ca7fb7b6..14f43eff 100644
--- a/Common/Production/ProductionUiCordonel.UnitTests/Features/ProductionProcessCheckProductionState.feature
+++ b/Common/Production/ProductionUiCordonel.UnitTests/Features/ProductionProcessCheckProductionState.feature
@@ -466,7 +466,7 @@ Then Check the generic test results
# ================================================================================================================================
@CheckProductionStateProcess
-Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_016]_Check_Complete_Flow_Production_State
+Scenario: [SRS_TBF_EOL_PP_CHECK_PROD_STATE_017]_Check_Complete_Flow_Production_State
FUNCTION: Check the entire production process sequence except the database calls with all underlaying sub-processes.
PRESETS: Preset all values with valid parameters to pass the test as "Okay" needed to successfully pass all underlaying tests:
- EOL Id | EOL StartDate | Cordonel PcbId | EOL PcbId
diff --git a/Common/Production/ProductionUiCordonel.UnitTests/Features/ProductionProcessCheckProductionState.feature.cs b/Common/Production/ProductionUiCordonel.UnitTests/Features/ProductionProcessCheckProductionState.feature.cs
index 98e275e1..e6c81d3d 100644
--- a/Common/Production/ProductionUiCordonel.UnitTests/Features/ProductionProcessCheckProductionState.feature.cs
+++ b/Common/Production/ProductionUiCordonel.UnitTests/Features/ProductionProcessCheckProductionState.feature.cs
@@ -1897,14 +1897,14 @@ testRunner.Then("Check the generic test results", ((string)(null)), ((TechTalk.S
}
[NUnit.Framework.TestAttribute()]
- [NUnit.Framework.DescriptionAttribute("[SRS_TBF_EOL_PP_CHECK_PROD_STATE_016]_Check_Complete_Flow_Production_State")]
+ [NUnit.Framework.DescriptionAttribute("[SRS_TBF_EOL_PP_CHECK_PROD_STATE_017]_Check_Complete_Flow_Production_State")]
[NUnit.Framework.CategoryAttribute("CheckProductionStateProcess")]
- public virtual void SRS_TBF_EOL_PP_CHECK_PROD_STATE_016_Check_Complete_Flow_Production_State()
+ public virtual void SRS_TBF_EOL_PP_CHECK_PROD_STATE_017_Check_Complete_Flow_Production_State()
{
string[] tagsOfScenario = new string[] {
"CheckProductionStateProcess"};
System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("[SRS_TBF_EOL_PP_CHECK_PROD_STATE_016]_Check_Complete_Flow_Production_State", "FUNCTION: Check the entire production process sequence except the database calls " +
+ TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("[SRS_TBF_EOL_PP_CHECK_PROD_STATE_017]_Check_Complete_Flow_Production_State", "FUNCTION: Check the entire production process sequence except the database calls " +
"with all underlaying sub-processes. \r\nPRESETS: Preset all values with valid par" +
"ameters to pass the test as \"Okay\" needed to successfully pass all underlaying t" +
"ests:\r\n - EOL Id | EOL StartDate | Cordonel PcbId | EOL PcbId\r\n " +
diff --git a/Common/Production/ProductionUiCordonel.UnitTests/Steps/CommonProductionProcessSteps.cs b/Common/Production/ProductionUiCordonel.UnitTests/Steps/CommonProductionProcessSteps.cs
index 2e16389d..edae2d01 100644
--- a/Common/Production/ProductionUiCordonel.UnitTests/Steps/CommonProductionProcessSteps.cs
+++ b/Common/Production/ProductionUiCordonel.UnitTests/Steps/CommonProductionProcessSteps.cs
@@ -256,7 +256,10 @@ namespace Xylem.Common.Production.ProductionUiCordonel.UnitTests.Steps
/// Presets needed to pass preceding tests or initialize some properties to a defined state
///
private String _presetTestCaseJson = "";
- private TestRequirement _presets;
+ ///
+ /// Presets needed to pass preceding tests or initialize some properties to a defined state
+ ///
+ private TestRequirement _presetTestCase;
#endregion ----------------------------- Production State Properties ------------------------------------------
@@ -868,55 +871,52 @@ namespace Xylem.Common.Production.ProductionUiCordonel.UnitTests.Steps
///
/// - Login to build App list and registers.
///
+ ///
+ /// - New object with deep copy of presetTestCase using the Json serializer.
+ ///
+ ///
+ /// - Moved meter login for new test requirement and register restorers modification to
+ /// .
+ ///
private void ReadTestTable(Table table)
{
// Generate list of tests out of the "Given" table and create test-cases
foreach (var row in table.Rows)
{
- //var testCase = NewTestRequirement();
- //// Check if presets are required, if so copy all properties
- //if (_presets.Meter != null)
- //{
- // ClassAccess.CopyAllProperties(testCase.Meter, _presets.Meter);
- // ClassAccess.CopyAllProperties(testCase.ProductionRequirements, _presets.ProductionRequirements);
- // ClassAccess.CopyAllProperties(testCase.RequiredEOLProgress, _presets.RequiredEOLProgress);
- // ClassAccess.CopyAllProperties(testCase.CalibCheckRegisterRestorer,
- // _presets.CalibCheckRegisterRestorer);
- // ClassAccess.CopyAllProperties(testCase.RegisterRestorer, _presets.RegisterRestorer);
- // ClassAccess.CopyAllProperties(testCase.CordonelDeviceStatus, _presets.CordonelDeviceStatus);
- // testCase.FwUpdatePackage.AddRange(_presets.FwUpdatePackage);
- // testCase.TestBenchState.AddRange(_presets.TestBenchState);
- //}
-
TestRequirement testCase;
// Check if presets are required, if so copy all properties using the Json.Deserializer to create a
- // new object!!!
- if (_presets.Meter != null)
+ // new object as deep copy!!!
+ if (_presetTestCase.Meter != null)
{
if (string.IsNullOrEmpty(_presetTestCaseJson))
{
- _presetTestCaseJson = JsonConvert.SerializeObject(_presets);
+ _presetTestCaseJson = JsonConvert.SerializeObject(_presetTestCase);
}
+ // Create a new object with a deep copy of the _presetTestCase
testCase = JsonConvert.DeserializeObject(_presetTestCaseJson);
- //if (testCase.Meter == null)
- //{
- // testCase.Meter = new MockGenesis();
- //}
+
+ // Special meter properties which are not include in the deep copy
+ ClassAccess.CopyAllProperties(testCase.Meter, _presetTestCase.Meter);
+
+ // Login is needed for building the MeterAppListVersion and generating the accessible register list.
+ // This register list will be used to check for valid ranges.
+ testCase.Meter?.Login();
}
+ // Preset is not required, a single testCase has to be created
else
{
testCase = NewTestRequirement();
}
- // Enable register compare even if not physically read from meter
- testCase.RegisterRestorer.RenewMeter(testCase.Meter);
- testCase.RegisterRestorer.EnableCompareExternalSetRegisters();
- testCase.CalibCheckRegisterRestorer.RenewMeter(testCase.Meter);
- testCase.CalibCheckRegisterRestorer.EnableCompareExternalSetRegisters();
+ //// Enable register compare even if not physically read from meter
+ //testCase.RegisterRestorer.RenewMeter(testCase.Meter);
+ //testCase.RegisterRestorer.EnableCompareExternalSetRegisters();
+ //testCase.CalibCheckRegisterRestorer.RenewMeter(testCase.Meter);
+ //testCase.CalibCheckRegisterRestorer.EnableCompareExternalSetRegisters();
- // Login is needed for building the MeterAppListVersion and generating the accessible register list.
- // This register list will be used to check for valid ranges.
- testCase.Meter?.Login();
+ //// Login is needed for building the MeterAppListVersion and generating the accessible register list.
+ //// This register list will be used to check for valid ranges.
+ //testCase.Meter?.Login();
// This is the multiple row test table defining individual test cases
ReadTable(row, ref testCase);
@@ -936,20 +936,23 @@ namespace Xylem.Common.Production.ProductionUiCordonel.UnitTests.Steps
///
/// - Login to build App list and registers.
///
+ ///
+ /// - Moved meter login to .
+ ///
private void ReadPresetTable(Table table)
{
- if (_presets.Meter == null)
+ if (_presetTestCase.Meter == null)
{
- _presets = NewTestRequirement();
+ _presetTestCase = NewTestRequirement();
}
- // Login is needed for building the MeterAppListVersion and generating the accessible register list.
- // This register list will be used to check for valid ranges.
- _presets.Meter?.Login();
+ //// Login is needed for building the MeterAppListVersion and generating the accessible register list.
+ //// This register list will be used to check for valid ranges.
+ //_presetTestCase.Meter?.Login();
// A preset table is limited to exclusively one row, those settings will be used for every test of the
// test-cases!
- ReadTable(table.Rows[0], ref _presets);
+ ReadTable(table.Rows[0], ref _presetTestCase);
}
///
@@ -1755,6 +1758,9 @@ namespace Xylem.Common.Production.ProductionUiCordonel.UnitTests.Steps
///
/// - Initial.
///
+ ///
+ /// - Init meter and enable change of values for register restorers.
+ ///
private static TestRequirement NewTestRequirement()
{
var testCase = new TestRequirement
@@ -1772,6 +1778,13 @@ namespace Xylem.Common.Production.ProductionUiCordonel.UnitTests.Steps
};
testCase.RegisterRestorer = new RegisterRestorer(testCase.Meter);
testCase.CalibCheckRegisterRestorer = new RegisterRestorer(testCase.Meter);
+ // Enable register compare even if not physically read from meter
+ testCase.RegisterRestorer.EnableCompareExternalSetRegisters();
+ testCase.CalibCheckRegisterRestorer.EnableCompareExternalSetRegisters();
+
+ // Login is needed for building the MeterAppListVersion and generating the accessible register list.
+ // This register list will be used to check for valid ranges.
+ testCase.Meter?.Login();
return testCase;
}
diff --git a/Common/Production/ProductionUiCordonel/ProductionProcesses/EolProcesses/CheckProductionState.cs b/Common/Production/ProductionUiCordonel/ProductionProcesses/EolProcesses/CheckProductionState.cs
index 8bbeac57..eba8e874 100644
--- a/Common/Production/ProductionUiCordonel/ProductionProcesses/EolProcesses/CheckProductionState.cs
+++ b/Common/Production/ProductionUiCordonel/ProductionProcesses/EolProcesses/CheckProductionState.cs
@@ -277,6 +277,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
/// be completed as the PcbId and the order number is needed.
/// Checks:
/// - Requirements are collected,
+ /// - Validate CSD,
/// - EOL progress for Sentinel can be generated,
/// - PcbId,
/// - Region,
@@ -332,6 +333,9 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
///
/// - Check radio signal levels in parameter list.
///
+ ///
+ /// - Validate CSD.
+ ///
public override StatusReturn ExecuteProcess()
{
var erroneousSequenceStep = false;
diff --git a/Common/Production/ProductionUiCordonel/ProductionProcesses/PickingProcesses/CheckProductionState.cs b/Common/Production/ProductionUiCordonel/ProductionProcesses/PickingProcesses/CheckProductionState.cs
index eb6c8151..05ab8c21 100644
--- a/Common/Production/ProductionUiCordonel/ProductionProcesses/PickingProcesses/CheckProductionState.cs
+++ b/Common/Production/ProductionUiCordonel/ProductionProcesses/PickingProcesses/CheckProductionState.cs
@@ -157,6 +157,9 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
///
/// - Initial.
///
+ ///
+ /// - Validate CSD.
+ ///
public override StatusReturn ExecuteProcess()
{
var erroneousSequenceStep = false;