diff --git a/Adaptation/FileHandlers/QS408M/ProcessData.cs b/Adaptation/FileHandlers/QS408M/ProcessData.cs index 9914c26..e5d2c9b 100644 --- a/Adaptation/FileHandlers/QS408M/ProcessData.cs +++ b/Adaptation/FileHandlers/QS408M/ProcessData.cs @@ -375,9 +375,9 @@ public partial class ProcessData : IProcessData double thicknessFourteenCriticalPointsAverage = thicknessTenPoints.Average(); // 15 double thicknessFourteenCriticalPointsStdDev = StandardDeviation(thicknessTenPoints); // 16 double thicknessFourteenCenterMean = thicknessPoints[4]; // 17 - double thicknessFourteenMeanFrom = new double[] { thicknessPoints[3], thicknessPoints[4], thicknessPoints[5], thicknessPoints[6] }.Average(); // 18 - double thicknessFourteen5mmEdgeMean = new double[] { thicknessPoints[0], thicknessPoints[1], thicknessPoints[8], thicknessPoints[9] }.Average(); // 19 - double thicknessFourteen3mmEdgeMean = new double[] { thicknessPoints[10], thicknessPoints[13] }.Average(); // 20 + double thicknessFourteenMeanFrom = new double[] { thicknessPoints[1], thicknessPoints[2], thicknessPoints[6], thicknessPoints[7] }.Average(); // 18 + double thicknessFourteen5mmEdgeMean = new double[] { thicknessPoints[0], thicknessPoints[9] }.Average(); // 19 + double thicknessFourteen3mmEdgeMean = new double[] { thicknessPoints[10], thicknessPoints[11], thicknessPoints[12], thicknessPoints[13] }.Average(); // 20 double thicknessFourteen5mmEdgePercent = (thicknessFourteen5mmEdgeMean - thicknessFourteenMeanFrom) / thicknessFourteenMeanFrom * 100; // 21 double thicknessFourteen3mmEdgePercent = (thicknessFourteen3mmEdgeMean - thicknessFourteenMeanFrom) / thicknessFourteenMeanFrom * 100; // 22 ThicknessFourteenCriticalPointsAverage = thicknessFourteenCriticalPointsAverage.ToString("0.0000000"); // 15 diff --git a/Adaptation/_Tests/Extract/Production/v2.57.0/BIORAD2.cs b/Adaptation/_Tests/Extract/Production/v2.57.0/BIORAD2.cs index da654cf..72408b8 100644 --- a/Adaptation/_Tests/Extract/Production/v2.57.0/BIORAD2.cs +++ b/Adaptation/_Tests/Extract/Production/v2.57.0/BIORAD2.cs @@ -125,5 +125,27 @@ public class BIORAD2 NonThrowTryCatch(); } +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_57_0__BIORAD2__QS408M638635290101315251__ADO126448() + { + DateTime dateTime; + string check = "*.txt"; + bool validatePDSF = false; + _BIORAD2.Production__v2_57_0__BIORAD2__QS408M(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD2.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _BIORAD2.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: string.Empty); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: "Tue Nov 10 12:03:56 1970"); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + NonThrowTryCatch(); + } + } #endif \ No newline at end of file diff --git a/Adaptation/_Tests/Static/QS408M.cs b/Adaptation/_Tests/Static/QS408M.cs index f139fdf..ed2088c 100644 --- a/Adaptation/_Tests/Static/QS408M.cs +++ b/Adaptation/_Tests/Static/QS408M.cs @@ -54,6 +54,16 @@ public class QS408M : LoggingUnitTesting, IDisposable Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString()); } + [TestMethod] + public void TestDateTimeB() + { + DateTime dateTimeA = new(1970, 01, 01); + DateTime dateTimeB = new(2024, 09, 19, 10, 41, 16); + TimeSpan timeSpan = new(dateTimeB.Ticks - dateTimeA.Ticks); + long infinityQS = (long)Math.Floor(timeSpan.TotalSeconds); + Assert.IsTrue(infinityQS == 1726767676); + } + [TestMethod] public void TestDescriptor() {