Compare commits
2 Commits
68c3a8b5f3
...
94215def9c
Author | SHA1 | Date | |
---|---|---|---|
94215def9c | |||
d9cf8d2aae |
7
Adaptation/.vscode/settings.json
vendored
7
Adaptation/.vscode/settings.json
vendored
@ -1,4 +1,11 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"*.ffs_gui": "xml",
|
||||
"*.hurl": "http",
|
||||
"*.org": "ini",
|
||||
"*.net": "ini",
|
||||
"default": "ini"
|
||||
},
|
||||
"[markdown]": {
|
||||
"editor.wordWrap": "off"
|
||||
},
|
||||
|
@ -7,6 +7,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
@ -44,12 +45,11 @@ public class ProcessData : IProcessData
|
||||
{
|
||||
List<Description> results = new();
|
||||
Description? description;
|
||||
JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
|
||||
foreach (JsonElement jsonElement in jsonElements)
|
||||
{
|
||||
if (jsonElement.ValueKind != JsonValueKind.Object)
|
||||
throw new Exception();
|
||||
description = JsonSerializer.Deserialize<Description>(jsonElement.ToString(), jsonSerializerOptions);
|
||||
description = JsonSerializer.Deserialize(jsonElement.ToString(), SharedDescriptionSourceGenerationContext.Default.Description);
|
||||
if (description is null)
|
||||
continue;
|
||||
results.Add(description);
|
||||
|
@ -8,6 +8,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
@ -221,12 +222,11 @@ public class ProcessData : IProcessData
|
||||
{
|
||||
List<Description> results = new();
|
||||
Description? description;
|
||||
JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
|
||||
foreach (JsonElement jsonElement in jsonElements)
|
||||
{
|
||||
if (jsonElement.ValueKind != JsonValueKind.Object)
|
||||
throw new Exception();
|
||||
description = JsonSerializer.Deserialize<Description>(jsonElement.ToString(), jsonSerializerOptions);
|
||||
description = JsonSerializer.Deserialize(jsonElement.ToString(), SharedDescriptionSourceGenerationContext.Default.Description);
|
||||
if (description is null)
|
||||
continue;
|
||||
results.Add(description);
|
||||
|
@ -399,12 +399,11 @@ public class ProcessData : IProcessData
|
||||
{
|
||||
List<Description> results = new();
|
||||
Description? description;
|
||||
JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
|
||||
foreach (JsonElement jsonElement in jsonElements)
|
||||
{
|
||||
if (jsonElement.ValueKind != JsonValueKind.Object)
|
||||
throw new Exception();
|
||||
description = JsonSerializer.Deserialize<Description>(jsonElement.ToString(), jsonSerializerOptions);
|
||||
description = JsonSerializer.Deserialize(jsonElement.ToString(), SharedDescriptionSourceGenerationContext.Default.Description);
|
||||
if (description is null)
|
||||
continue;
|
||||
results.Add(description);
|
||||
|
@ -615,12 +615,11 @@ public class ProcessData : IProcessData
|
||||
{
|
||||
List<Description> results = new();
|
||||
Description? description;
|
||||
JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
|
||||
foreach (JsonElement jsonElement in jsonElements)
|
||||
{
|
||||
if (jsonElement.ValueKind != JsonValueKind.Object)
|
||||
throw new Exception();
|
||||
description = JsonSerializer.Deserialize<Description>(jsonElement.ToString(), jsonSerializerOptions);
|
||||
description = JsonSerializer.Deserialize(jsonElement.ToString(), SharedDescriptionSourceGenerationContext.Default.Description);
|
||||
if (description is null)
|
||||
continue;
|
||||
results.Add(description);
|
||||
|
@ -150,6 +150,11 @@ function updateRecordCoD(b: any, r: any, t: any, c: any, e: any, w: any, workIte
|
||||
|
||||
}
|
||||
}
|
||||
if (workItem.Id === 330178) {
|
||||
if (weightedShortestJobFirst != weightedShortestJobFirstFibonacci) {
|
||||
|
||||
}
|
||||
}
|
||||
workItem.CumulativeStoryPoints = ' ';
|
||||
workItem.TotalStoryPoints = totalStoryPoints + ' User Story Point(s)';
|
||||
workItem.AbsoluteDelta = data.Effort == undefined || data.Effort.FibonacciAverage == undefined || totalStoryPoints == undefined || totalStoryPoints === 0 ? ' ' : round(Math.abs(data.Effort.FibonacciAverage - ((totalStoryPoints / highestTotalStoryPoints) * 5)), 1);
|
||||
@ -165,17 +170,30 @@ function updateRecordCoD(b: any, r: any, t: any, c: any, e: any, w: any, workIte
|
||||
workItem.TimeCriticalityNotifications = data.TimeCriticality == undefined ? ' ' : getNotifications(t, data.TimeCriticality);
|
||||
workItem.RiskReductionMinusOpportunityEnablementNotifications = data.RiskReductionOpportunityEnablement == undefined ? ' ' : getNotifications(r, data.RiskReductionOpportunityEnablement);
|
||||
workItem.SortOrder = data.SortOrder == undefined ? 0 : data.SortOrder;
|
||||
let check = effort == workItem.Effort
|
||||
&& businessValue === workItem.BusinessValue
|
||||
&& timeCriticality === workItem.TimeCriticality
|
||||
&& riskReductionMinusOpportunityEnablement === workItem.RiskReductionMinusOpportunityEnablement;
|
||||
if (check && weightedShortestJobFirst == workItem.WeightedShortestJobFirst) {
|
||||
if (workItem.Effort == undefined ||
|
||||
workItem.BusinessValue == undefined ||
|
||||
workItem.TimeCriticality == undefined ||
|
||||
workItem.RiskReductionMinusOpportunityEnablement == undefined ||
|
||||
workItem.WeightedShortestJobFirst == undefined ||
|
||||
workItem.Effort == ' ' ||
|
||||
workItem.BusinessValue == ' ' ||
|
||||
workItem.TimeCriticality == ' ' ||
|
||||
workItem.RiskReductionMinusOpportunityEnablement == ' ' ||
|
||||
workItem.WeightedShortestJobFirst == ' ') {
|
||||
workItem.api = '';
|
||||
} else {
|
||||
workItem.api = `
|
||||
### Work Item Patch ${check} WSJF ${workItem.Id} ${weightedShortestJobFirst} != ${workItem.WeightedShortestJobFirst}
|
||||
}
|
||||
else {
|
||||
let check = effort === workItem.Effort
|
||||
&& businessValue === workItem.BusinessValue
|
||||
&& timeCriticality === workItem.TimeCriticality
|
||||
&& riskReductionMinusOpportunityEnablement === workItem.RiskReductionMinusOpportunityEnablement;
|
||||
if (check && weightedShortestJobFirst == workItem.WeightedShortestJobFirst) {
|
||||
workItem.api = '';
|
||||
} else {
|
||||
workItem.api = `
|
||||
### Work Item Patch ${check} WSJF ${workItem.Id} ${effort}:${workItem.Effort}; ${businessValue}:${workItem.BusinessValue}; ${timeCriticality}:${workItem.TimeCriticality}; ${riskReductionMinusOpportunityEnablement}:${workItem.RiskReductionMinusOpportunityEnablement}; ${weightedShortestJobFirst}:${workItem.WeightedShortestJobFirst};
|
||||
|
||||
patch {{Factory-Integration}}/_apis/wit/workitems/${workItem.Id}?api-version=7.0
|
||||
PATCH https://tfs.intra.infineon.com/tfs/FactoryIntegration/_apis/wit/workitems/${workItem.Id}?api-version=7.0
|
||||
Authorization: Basic {{PAT}}
|
||||
Content-Type: application/json-patch+json
|
||||
|
||||
@ -222,6 +240,7 @@ jsonpath "$.fields['Custom.RRminusOE']" == ${workItem.RiskReductionMinusOpportun
|
||||
jsonpath "$.fields['Microsoft.VSTS.Common.TimeCriticality']" == ${workItem.TimeCriticality}
|
||||
jsonpath "$.fields['Custom.WSJF']" == ${workItem.WeightedShortestJobFirst}
|
||||
jsonpath "$.fields['Custom.WSJFFib']" == ${workItem.WeightedShortestJobFirst}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -295,10 +314,19 @@ function getRecords(b: any, r: any, t: any, c: any, e: any, w: any, data: any, d
|
||||
|
||||
function getHtmlTextAndApi(fromHtml: any, b: any, r: any, t: any, c: any, e: any, w: any, records: any) {
|
||||
let record;
|
||||
let api = '';
|
||||
let lineA = '';
|
||||
let lineB = '';
|
||||
let lineC = '';
|
||||
let api = `
|
||||
### FactoryIntegration (hurl.exe)
|
||||
|
||||
GET https://tfs.intra.infineon.com/tfs/FactoryIntegration
|
||||
|
||||
HTTP 401
|
||||
[Asserts]
|
||||
duration < 12345
|
||||
|
||||
`;
|
||||
let text = 'Id\tRisk Reduction and/or Opportunity Enablement\tTime Criticality\tBusiness Value\tEffort\tWSJF\tCoD\tFeature Total Story Points\tAbsolute Delta\tState\tRequester\tAssigned To\tIteration Path\tSystem\tTitle-123\r\n';
|
||||
let html = '<tr><th>Parent Id</th><th>Parent Title</th><th>Id</th><th>Requester</th><th>Title</th><th>Assigned To</th><th>System(s)</th><th>State</th><th>Priority</th><th>Risk Reduction and/or Opportunity Enablement</th><th>Time Criticality</th><th>Business Value</th><th>Cost of Delay (CoD)</th><th>Effort</th><th>WSJF</th></tr>';
|
||||
for (let i = 0; i < records.length; i++) {
|
||||
@ -379,7 +407,7 @@ function getHtmlTextAndApi(fromHtml: any, b: any, r: any, t: any, c: any, e: any
|
||||
console.log(text);
|
||||
html += lineA + lineB + lineC;
|
||||
}
|
||||
return { html, text, http: api };
|
||||
return { html, text, api };
|
||||
}
|
||||
|
||||
const username = '';
|
||||
|
@ -143,7 +143,7 @@ function updateRecordCoD(b, r, t, c, e, w, workItem, highestTotalStoryPoints, da
|
||||
let businessValue = workItem.BusinessValue;
|
||||
let timeCriticality = workItem.TimeCriticality;
|
||||
let riskReductionMinusOpportunityEnablement = workItem.RiskReductionMinusOpportunityEnablement;
|
||||
let weightedShortestJobFirst = workItem.WeightedShortestJobFirst == undefined ? null : workItem.WeightedShortestJobFirst.toFixed(2);
|
||||
let weightedShortestJobFirst = workItem.WeightedShortestJobFirst == undefined ? ' ' : workItem.WeightedShortestJobFirst.toFixed(2);
|
||||
workItem.CumulativeStoryPoints = ' ';
|
||||
workItem.TotalStoryPoints = totalStoryPoints + ' User Story Point(s)';
|
||||
workItem.AbsoluteDelta = data.Effort == undefined || data.Effort.FibonacciAverage == undefined || totalStoryPoints == undefined || totalStoryPoints === 0 ? ' ' : round(Math.abs(data.Effort.FibonacciAverage - ((totalStoryPoints / highestTotalStoryPoints) * 5)), 1);
|
||||
@ -159,17 +159,30 @@ function updateRecordCoD(b, r, t, c, e, w, workItem, highestTotalStoryPoints, da
|
||||
workItem.TimeCriticalityNotifications = data.TimeCriticality == undefined ? ' ' : getNotifications(t, data.TimeCriticality);
|
||||
workItem.RiskReductionMinusOpportunityEnablementNotifications = data.RiskReductionOpportunityEnablement == undefined ? ' ' : getNotifications(r, data.RiskReductionOpportunityEnablement);
|
||||
workItem.SortOrder = data.SortOrder == undefined ? 0 : data.SortOrder;
|
||||
let check = effort == workItem.Effort
|
||||
&& businessValue === workItem.BusinessValue
|
||||
&& timeCriticality === workItem.TimeCriticality
|
||||
&& riskReductionMinusOpportunityEnablement === workItem.RiskReductionMinusOpportunityEnablement;
|
||||
if (check && weightedShortestJobFirst == workItem.WeightedShortestJobFirst) {
|
||||
if (workItem.Effort == undefined ||
|
||||
workItem.BusinessValue == undefined ||
|
||||
workItem.TimeCriticality == undefined ||
|
||||
workItem.RiskReductionMinusOpportunityEnablement == undefined ||
|
||||
workItem.WeightedShortestJobFirst == undefined ||
|
||||
workItem.Effort == ' ' ||
|
||||
workItem.BusinessValue == ' ' ||
|
||||
workItem.TimeCriticality == ' ' ||
|
||||
workItem.RiskReductionMinusOpportunityEnablement == ' ' ||
|
||||
workItem.WeightedShortestJobFirst == ' ') {
|
||||
workItem.api = '';
|
||||
} else {
|
||||
workItem.api = `
|
||||
### Work Item Patch ${check} WSJF ${workItem.Id} ${weightedShortestJobFirst} != ${workItem.WeightedShortestJobFirst}
|
||||
}
|
||||
else {
|
||||
let check = effort === workItem.Effort
|
||||
&& businessValue === workItem.BusinessValue
|
||||
&& timeCriticality === workItem.TimeCriticality
|
||||
&& riskReductionMinusOpportunityEnablement === workItem.RiskReductionMinusOpportunityEnablement;
|
||||
if (check && weightedShortestJobFirst == workItem.WeightedShortestJobFirst) {
|
||||
workItem.api = '';
|
||||
} else {
|
||||
workItem.api = `
|
||||
### Work Item Patch ${check} WSJF ${workItem.Id} ${effort}:${workItem.Effort}; ${businessValue}:${workItem.BusinessValue}; ${timeCriticality}:${workItem.TimeCriticality}; ${riskReductionMinusOpportunityEnablement}:${workItem.RiskReductionMinusOpportunityEnablement}; ${weightedShortestJobFirst}:${workItem.WeightedShortestJobFirst};
|
||||
|
||||
patch {{Factory-Integration}}/_apis/wit/workitems/${workItem.Id}?api-version=7.0
|
||||
PATCH https://tfs.intra.infineon.com/tfs/FactoryIntegration/_apis/wit/workitems/${workItem.Id}?api-version=7.0
|
||||
Authorization: Basic {{PAT}}
|
||||
Content-Type: application/json-patch+json
|
||||
|
||||
@ -216,6 +229,7 @@ jsonpath "$.fields['Custom.RRminusOE']" == ${workItem.RiskReductionMinusOpportun
|
||||
jsonpath "$.fields['Microsoft.VSTS.Common.TimeCriticality']" == ${workItem.TimeCriticality}
|
||||
jsonpath "$.fields['Custom.WSJF']" == ${workItem.WeightedShortestJobFirst}
|
||||
jsonpath "$.fields['Custom.WSJFFib']" == ${workItem.WeightedShortestJobFirst}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -319,10 +333,19 @@ function sendValue(fromHtml, element, page, id) {
|
||||
|
||||
function getHtmlTextAndApi(fromHtml, b, r, t, c, e, w, records) {
|
||||
let record;
|
||||
let api = '';
|
||||
let lineA = '';
|
||||
let lineB = '';
|
||||
let lineC = '';
|
||||
let api = `
|
||||
### FactoryIntegration (hurl.exe)
|
||||
|
||||
GET https://tfs.intra.infineon.com/tfs/FactoryIntegration
|
||||
|
||||
HTTP 401
|
||||
[Asserts]
|
||||
duration < 12345
|
||||
|
||||
`;
|
||||
let text = 'Id\tRisk Reduction and/or Opportunity Enablement\tTime Criticality\tBusiness Value\tEffort\tWSJF\tCoD\tFeature Total Story Points\tAbsolute Delta\tState\tRequester\tAssigned To\tIteration Path\tSystem\tTitle-123\r\n';
|
||||
let html = '<tr><th>Parent Id</th><th>Parent Title</th><th>Id</th><th>Requester</th><th>Title</th><th>Assigned To</th><th>System(s)</th><th>State</th><th>Priority</th><th>Risk Reduction and/or Opportunity Enablement</th><th>Time Criticality</th><th>Business Value</th><th>Cost of Delay (CoD)</th><th>Effort</th><th>WSJF</th></tr>';
|
||||
for (let i = 0; i < records.length; i++) {
|
||||
@ -403,7 +426,7 @@ function getHtmlTextAndApi(fromHtml, b, r, t, c, e, w, records) {
|
||||
console.log(text);
|
||||
html += lineA + lineB + lineC;
|
||||
}
|
||||
return { html, text, http: api };
|
||||
return { html, text, api };
|
||||
}
|
||||
|
||||
function updateSite(c, w) {
|
||||
@ -445,7 +468,12 @@ function setDocument(fromHtml, b, r, t, c, e, w, dataA, dataB, workItems) {
|
||||
if (fromHtml) {
|
||||
document.getElementById('HeaderGrid').innerHTML = result.html.replaceAll('>null<', '> <');
|
||||
if (_windowLocationHRef.indexOf('=WSJF') === -1) {
|
||||
document.getElementById('AllTextarea').value = result.text.replaceAll('null', '').replaceAll(' ', '') + result.http;
|
||||
if (_windowLocationHRef.indexOf('=EFFORT') > -1) {
|
||||
document.getElementById('AllTextarea').value = result.api;
|
||||
}
|
||||
else {
|
||||
document.getElementById('AllTextarea').value = result.text.replaceAll('null', '').replaceAll(' ', '');
|
||||
}
|
||||
}
|
||||
else {
|
||||
_toggle = !_toggle;
|
||||
|
@ -226,9 +226,9 @@ public class MonIn : IMonIn, IDisposable
|
||||
{
|
||||
StringBuilder stringBuilder = new();
|
||||
if (string.IsNullOrEmpty(subresource))
|
||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} \n{5}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), stateName.Trim(), state.Trim(), description.Trim());
|
||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} \n{5}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : "now", resource.Trim(), stateName.Trim(), state.Trim(), description.Trim());
|
||||
else
|
||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} \n{6}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), subresource.Trim(), stateName.Trim(), state.Trim(), description.Trim());
|
||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} \n{6}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : "now", resource.Trim(), subresource.Trim(), stateName.Trim(), state.Trim(), description.Trim());
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
@ -247,14 +247,14 @@ public class MonIn : IMonIn, IDisposable
|
||||
if (string.IsNullOrEmpty(subresource))
|
||||
{
|
||||
if (unit.Equals(string.Empty) && !interval.HasValue)
|
||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} \n{5}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), performanceName.Trim(), value, description.Trim());
|
||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} \n{5}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : "now", resource.Trim(), performanceName.Trim(), value, description.Trim());
|
||||
else
|
||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} {5} {{interval={6}, unit={7}}}\n", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), performanceName.Trim(), value, description.Trim(), interval.HasValue ? interval.Value.ToString() : (object)string.Empty, unit.Trim());
|
||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} {5} {{interval={6}, unit={7}}}\n", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : "now", resource.Trim(), performanceName.Trim(), value, description.Trim(), interval.HasValue ? interval.Value.ToString() : string.Empty, unit.Trim());
|
||||
}
|
||||
else if (unit.Equals(string.Empty) && !interval.HasValue)
|
||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} \n{6}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), subresource.Trim(), performanceName.Trim(), value, description.Trim());
|
||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} \n{6}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : "now", resource.Trim(), subresource.Trim(), performanceName.Trim(), value, description.Trim());
|
||||
else
|
||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} {6} {{interval={7}, unit={8}}}\n", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), subresource.Trim(), performanceName.Trim(), value, description.Trim(), interval.HasValue ? interval.Value.ToString() : (object)string.Empty, unit.Trim());
|
||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} {6} {{interval={7}, unit={8}}}\n", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : "now", resource.Trim(), subresource.Trim(), performanceName.Trim(), value, description.Trim(), interval.HasValue ? interval.Value.ToString() : string.Empty, unit.Trim());
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.Shared.Duplicator;
|
||||
|
||||
@ -142,4 +143,16 @@ public class Description : IDescription, Properties.IDescription
|
||||
|
||||
internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt";
|
||||
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
|
||||
[JsonSerializable(typeof(Description))]
|
||||
internal partial class SharedDescriptionSourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
|
||||
[JsonSerializable(typeof(Description[]))]
|
||||
internal partial class SharedDescriptionArraySourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
@ -9,7 +9,6 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading;
|
||||
|
||||
namespace Adaptation.Shared;
|
||||
@ -447,12 +446,13 @@ public class FileRead : Properties.IFileRead
|
||||
{
|
||||
List<Properties.IDescription> results = new();
|
||||
Duplicator.Description description;
|
||||
JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
|
||||
foreach (JsonElement jsonElement in jsonElements)
|
||||
{
|
||||
if (jsonElement.ValueKind != JsonValueKind.Object)
|
||||
throw new Exception();
|
||||
description = JsonSerializer.Deserialize<Duplicator.Description>(jsonElement.ToString(), jsonSerializerOptions);
|
||||
description = JsonSerializer.Deserialize(jsonElement.ToString(), Duplicator.SharedDescriptionSourceGenerationContext.Default.Description);
|
||||
if (description is null)
|
||||
continue;
|
||||
results.Add(description);
|
||||
}
|
||||
return results;
|
||||
|
@ -187,7 +187,7 @@ internal class ProcessDataStandardFormat
|
||||
break;
|
||||
}
|
||||
}
|
||||
string? linesOne = lines.Length > 0 && body.Count == 0 && columns.Count == 0 ? lines[1] : null;
|
||||
string? linesOne = lines.Length > 1 && body.Count == 0 && columns.Count == 0 ? lines[1] : null;
|
||||
logistics = GetLogistics(footer, linesOne: linesOne);
|
||||
if (logistics.Count == 0)
|
||||
sequence = null;
|
||||
@ -235,7 +235,7 @@ internal class ProcessDataStandardFormat
|
||||
const int columnsLine = 6;
|
||||
FileInfo fileInfo = new(reportFullPath);
|
||||
ProcessDataStandardFormat processDataStandardFormat = GetProcessDataStandardFormat(fileInfo.LastWriteTime, columnsLine, fileInfo.FullName, lines: null);
|
||||
JsonElement[]? jsonElements = processDataStandardFormatMapping.OldColumnNames.Count != processDataStandardFormatMapping.ColumnIndices.Count ? null : GetFullArray(processDataStandardFormat);
|
||||
JsonElement[]? jsonElements = processDataStandardFormatMapping.OldColumnNames.Count == 0 ? null : GetFullArray(processDataStandardFormat);
|
||||
JsonProperty[]? jsonProperties = jsonElements is null || jsonElements.Length == 0 ? null : jsonElements[0].EnumerateObject().ToArray();
|
||||
if (jsonElements is null || jsonProperties is null || jsonProperties.Length != processDataStandardFormatMapping.NewColumnNames.Count)
|
||||
result = processDataStandardFormat;
|
||||
@ -654,6 +654,17 @@ internal class ProcessDataStandardFormat
|
||||
return results;
|
||||
}
|
||||
|
||||
internal static JsonElement[] GetArray(string reportFullPath, string[] lines, ProcessDataStandardFormat processDataStandardFormat)
|
||||
{
|
||||
JsonElement[] results;
|
||||
string? json = GetRecordsJson(reportFullPath, lines);
|
||||
if (string.IsNullOrEmpty(json))
|
||||
results = GetArray(processDataStandardFormat);
|
||||
else
|
||||
results = JsonSerializer.Deserialize(json, JsonElementCollectionSourceGenerationContext.Default.JsonElementArray) ?? throw new Exception();
|
||||
return results;
|
||||
}
|
||||
|
||||
internal static string GetPDSFText(IFileRead fileRead, Logistics logistics, JsonElement[] jsonElements, string logisticsText)
|
||||
{
|
||||
string result;
|
||||
@ -903,7 +914,7 @@ internal class ProcessDataStandardFormat
|
||||
}
|
||||
foreach (KeyValuePair<string, List<string>> keyValuePair in results)
|
||||
{
|
||||
if (body.Count < 3)
|
||||
if (body.Count < 2)
|
||||
break;
|
||||
if (keyValuePair.Value.Count != body.Count)
|
||||
continue;
|
||||
@ -956,6 +967,26 @@ internal class ProcessDataStandardFormat
|
||||
return result;
|
||||
}
|
||||
|
||||
private static string? GetRecordsJson(string reportFullPath, string[] lines)
|
||||
{
|
||||
string? result;
|
||||
bool foundRecords = false;
|
||||
List<string> results = new();
|
||||
lines ??= File.ReadAllLines(reportFullPath);
|
||||
foreach (string line in lines)
|
||||
{
|
||||
if (line.StartsWith("\"Records\""))
|
||||
foundRecords = true;
|
||||
if (!foundRecords)
|
||||
continue;
|
||||
if (line == "],")
|
||||
break;
|
||||
results.Add(line);
|
||||
}
|
||||
result = results.Count == 0 ? null : $"{string.Join(Environment.NewLine, results.Skip(1))}{Environment.NewLine}]";
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
|
@ -1,4 +1,4 @@
|
||||
#if true
|
||||
#if v2_60_0
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#if true
|
||||
#if v2_60_0
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#if true
|
||||
#if v2_60_0
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
@ -0,0 +1,65 @@
|
||||
#if true
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Development.v2_61_1;
|
||||
|
||||
[TestClass]
|
||||
public class BACKLOG_EQPT : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static BACKLOG_EQPT EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
static BACKLOG_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||
|
||||
public BACKLOG_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public BACKLOG_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
EAFLoggingUnitTesting ??= new BACKLOG_EQPT(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||
}
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__BACKLOG_EQPT__DownloadWorkItems()
|
||||
{
|
||||
string check = ".xlsx";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -0,0 +1,65 @@
|
||||
#if true
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Development.v2_61_1;
|
||||
|
||||
[TestClass]
|
||||
public class BACKLOG : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static BACKLOG EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
static BACKLOG() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||
|
||||
public BACKLOG() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public BACKLOG(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
EAFLoggingUnitTesting ??= new BACKLOG(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||
}
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__BACKLOG__json()
|
||||
{
|
||||
string check = "*.json";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -0,0 +1,117 @@
|
||||
#if true
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Development.v2_61_1;
|
||||
|
||||
[TestClass]
|
||||
public class MESAFIBACKLOG : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static MESAFIBACKLOG EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
static MESAFIBACKLOG() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||
|
||||
public MESAFIBACKLOG() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public MESAFIBACKLOG(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
EAFLoggingUnitTesting ??= new MESAFIBACKLOG(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||
}
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__MESAFIBACKLOG__Kanban()
|
||||
{
|
||||
string check = "*.json";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__MESAFIBACKLOG__Markdown()
|
||||
{
|
||||
string check = "*.json";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__MESAFIBACKLOG__ADO()
|
||||
{
|
||||
string check = "*.json";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__MESAFIBACKLOG__Priority()
|
||||
{
|
||||
string check = "*.json";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__MESAFIBACKLOG__Violation()
|
||||
{
|
||||
string check = "*.json";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -1,4 +1,4 @@
|
||||
#if true
|
||||
#if v2_60_0
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#if true
|
||||
#if v2_60_0
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#if true
|
||||
#if v2_60_0
|
||||
using Adaptation.FileHandlers.json.WorkItems;
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
|
@ -0,0 +1,52 @@
|
||||
#if true
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Development.v2_61_1;
|
||||
|
||||
[TestClass]
|
||||
public class BACKLOG_EQPT
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Development.v2_61_1.BACKLOG_EQPT _BACKLOG_EQPT;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Development.v2_61_1.BACKLOG_EQPT.ClassInitialize(testContext);
|
||||
_BACKLOG_EQPT = CreateSelfDescription.Development.v2_61_1.BACKLOG_EQPT.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
private static void NonThrowTryCatch()
|
||||
{
|
||||
try
|
||||
{ throw new Exception(); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__BACKLOG_EQPT__DownloadWorkItems() => _BACKLOG_EQPT.Development__v2_61_1__BACKLOG_EQPT__DownloadWorkItems();
|
||||
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__BACKLOG_EQPT__DownloadWorkItems638612245609095845__Normal()
|
||||
{
|
||||
string check = ".json";
|
||||
bool validatePDSF = false;
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
_BACKLOG_EQPT.Development__v2_61_1__BACKLOG_EQPT__DownloadWorkItems();
|
||||
_ = _BACKLOG_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
for (int i = 0; i < int.MinValue; i++)
|
||||
Thread.Sleep(500);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
64
Adaptation/_Tests/Extract/Development/v2.61.1/BACKLOG.cs
Normal file
64
Adaptation/_Tests/Extract/Development/v2.61.1/BACKLOG.cs
Normal file
@ -0,0 +1,64 @@
|
||||
#if true
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Development.v2_61_1;
|
||||
|
||||
[TestClass]
|
||||
public class BACKLOG
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Development.v2_61_1.BACKLOG _BACKLOG;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Development.v2_61_1.BACKLOG.ClassInitialize(testContext);
|
||||
_BACKLOG = CreateSelfDescription.Development.v2_61_1.BACKLOG.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
private static void NonThrowTryCatch()
|
||||
{
|
||||
try
|
||||
{ throw new Exception(); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__BACKLOG__json() => _BACKLOG.Development__v2_61_1__BACKLOG__json();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__BACKLOG__json638612245609095846__Normal()
|
||||
{
|
||||
string check = "*.json";
|
||||
bool validatePDSF = false;
|
||||
_BACKLOG.Development__v2_61_1__BACKLOG__json();
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(_BACKLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
|
||||
string[] variables = _BACKLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _BACKLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
|
||||
Assert.IsNotNull(extractResult.Item3);
|
||||
Assert.IsNotNull(extractResult.Item4);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
249
Adaptation/_Tests/Extract/Development/v2.61.1/MESAFIBACKLOG.cs
Normal file
249
Adaptation/_Tests/Extract/Development/v2.61.1/MESAFIBACKLOG.cs
Normal file
@ -0,0 +1,249 @@
|
||||
#if true
|
||||
using Adaptation.FileHandlers.json.WorkItems;
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Development.v2_61_1;
|
||||
|
||||
[TestClass]
|
||||
public class MESAFIBACKLOG
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Development.v2_61_1.MESAFIBACKLOG _MESAFIBACKLOG;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Development.v2_61_1.MESAFIBACKLOG.ClassInitialize(testContext);
|
||||
_MESAFIBACKLOG = CreateSelfDescription.Development.v2_61_1.MESAFIBACKLOG.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
private static void NonThrowTryCatch()
|
||||
{
|
||||
try
|
||||
{ throw new Exception(); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__MESAFIBACKLOG__Kanban() => _MESAFIBACKLOG.Development__v2_61_1__MESAFIBACKLOG__Kanban();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__MESAFIBACKLOG__Kanban638323658386612552__Normal()
|
||||
{
|
||||
string check = "*.json";
|
||||
bool validatePDSF = false;
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
_MESAFIBACKLOG.Development__v2_61_1__MESAFIBACKLOG__Kanban();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(_MESAFIBACKLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
|
||||
string[] variables = _MESAFIBACKLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _MESAFIBACKLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
|
||||
Assert.IsNotNull(extractResult.Item3);
|
||||
Assert.IsNotNull(extractResult.Item4);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__MESAFIBACKLOG__Markdown() => _MESAFIBACKLOG.Development__v2_61_1__MESAFIBACKLOG__Markdown();
|
||||
|
||||
private static ReadOnlyDictionary<string, FileInfo> GetKeyValuePairs(List<FileInfo> collection)
|
||||
{
|
||||
Dictionary<string, FileInfo> results = [];
|
||||
foreach (FileInfo fileInfo in collection)
|
||||
results.Add(fileInfo.Name, fileInfo);
|
||||
return new(results);
|
||||
}
|
||||
|
||||
private static ReadOnlyCollection<Record> GetRecords(FileInfo fileInfo)
|
||||
{
|
||||
Record[] results;
|
||||
string json = File.ReadAllText(fileInfo.FullName);
|
||||
results = JsonSerializer.Deserialize<Record[]>(json);
|
||||
return new(results);
|
||||
}
|
||||
|
||||
private static void Verify122508(FileInfo fileInfo)
|
||||
{
|
||||
ReadOnlyCollection<Record> records = GetRecords(fileInfo);
|
||||
Assert.IsNotNull(records);
|
||||
// Assert.IsTrue(records.Count == 10);
|
||||
// Assert.IsTrue(records.Count == 6);
|
||||
}
|
||||
|
||||
private static void Verify122514(FileInfo fileInfo)
|
||||
{
|
||||
ReadOnlyCollection<Record> records = GetRecords(fileInfo);
|
||||
Assert.IsNotNull(records);
|
||||
// Assert.IsTrue(records.Count == 25);
|
||||
// Assert.IsTrue(records.Count == 6);
|
||||
}
|
||||
|
||||
private static void Verify126169(FileInfo fileInfo)
|
||||
{
|
||||
ReadOnlyCollection<Record> records = GetRecords(fileInfo);
|
||||
Assert.IsNotNull(records);
|
||||
// Assert.IsTrue(records.Count == 1);
|
||||
// Assert.IsTrue(records.Count == 1);
|
||||
}
|
||||
|
||||
private static void Verify123066(FileInfo fileInfo)
|
||||
{
|
||||
ReadOnlyCollection<Record> records = GetRecords(fileInfo);
|
||||
Assert.IsNotNull(records);
|
||||
// Assert.IsTrue(records.Count == 24);
|
||||
// Assert.IsTrue(records.Count == 5);
|
||||
}
|
||||
|
||||
private static void Verify123067(FileInfo fileInfo)
|
||||
{
|
||||
ReadOnlyCollection<Record> records = GetRecords(fileInfo);
|
||||
Assert.IsNotNull(records);
|
||||
// Assert.IsTrue(records.Count == 24);
|
||||
// Assert.IsTrue(records.Count == 5);
|
||||
}
|
||||
|
||||
private static void Verify122517(FileInfo fileInfo)
|
||||
{
|
||||
ReadOnlyCollection<Record> records = GetRecords(fileInfo);
|
||||
Assert.IsNotNull(records);
|
||||
// Assert.IsTrue(records.Count == 14);
|
||||
// Assert.IsTrue(records.Count == 14);
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__MESAFIBACKLOG__Markdown638323658386612552__Normal()
|
||||
{
|
||||
string check = "*.json";
|
||||
bool validatePDSF = false;
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
_MESAFIBACKLOG.Development__v2_61_1__MESAFIBACKLOG__Markdown();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(_MESAFIBACKLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
|
||||
string[] variables = _MESAFIBACKLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _MESAFIBACKLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
|
||||
Assert.IsNotNull(extractResult.Item3);
|
||||
Assert.IsNotNull(extractResult.Item4);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__MESAFIBACKLOG__ADO638323658386612552__Normal()
|
||||
{
|
||||
string check = "*.json";
|
||||
bool validatePDSF = false;
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
_MESAFIBACKLOG.Development__v2_61_1__MESAFIBACKLOG__ADO();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(_MESAFIBACKLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
|
||||
string[] variables = _MESAFIBACKLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _MESAFIBACKLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
|
||||
Assert.IsNotNull(extractResult.Item3);
|
||||
Assert.IsNotNull(extractResult.Item4);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__MESAFIBACKLOG__Priority638323658386612552__Normal()
|
||||
{
|
||||
string check = "*.json";
|
||||
bool validatePDSF = false;
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
_MESAFIBACKLOG.Development__v2_61_1__MESAFIBACKLOG__Priority();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(_MESAFIBACKLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
|
||||
string[] variables = _MESAFIBACKLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _MESAFIBACKLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
|
||||
Assert.IsNotNull(extractResult.Item3);
|
||||
Assert.IsNotNull(extractResult.Item4);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__MESAFIBACKLOG__Markdown638779784153157286__Normal()
|
||||
{
|
||||
string check = "*.json";
|
||||
bool validatePDSF = false;
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
_MESAFIBACKLOG.Development__v2_61_1__MESAFIBACKLOG__Markdown();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(_MESAFIBACKLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
|
||||
string[] variables = _MESAFIBACKLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _MESAFIBACKLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
|
||||
Assert.IsNotNull(extractResult.Item3);
|
||||
Assert.IsNotNull(extractResult.Item4);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Development__v2_61_1__MESAFIBACKLOG__Violation638779784153157287__Normal()
|
||||
{
|
||||
string check = "*.json";
|
||||
bool validatePDSF = false;
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
_MESAFIBACKLOG.Development__v2_61_1__MESAFIBACKLOG__Violation();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(_MESAFIBACKLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
|
||||
string[] variables = _MESAFIBACKLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _MESAFIBACKLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
|
||||
Assert.IsNotNull(extractResult.Item3);
|
||||
Assert.IsNotNull(extractResult.Item4);
|
||||
ReadOnlyDictionary<string, FileInfo> keyValuePairs = GetKeyValuePairs(extractResult.Item4);
|
||||
Assert.IsTrue(keyValuePairs.ContainsKey("check-122508.json"));
|
||||
Assert.IsTrue(keyValuePairs.ContainsKey("check-122514.json"));
|
||||
Assert.IsTrue(keyValuePairs.ContainsKey("check-126169.json"));
|
||||
Assert.IsTrue(keyValuePairs.ContainsKey("check-123066.json"));
|
||||
Assert.IsTrue(keyValuePairs.ContainsKey("check-123067.json"));
|
||||
Assert.IsTrue(keyValuePairs.ContainsKey("check-122517.json"));
|
||||
Verify122508(keyValuePairs["check-122508.json"]);
|
||||
Verify122514(keyValuePairs["check-122514.json"]);
|
||||
Verify126169(keyValuePairs["check-126169.json"]);
|
||||
Verify123066(keyValuePairs["check-123066.json"]);
|
||||
Verify123067(keyValuePairs["check-123067.json"]);
|
||||
Verify122517(keyValuePairs["check-122517.json"]);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -193,7 +193,12 @@ public class AdaptationTesting : ISMTP
|
||||
segments = withActualCICN.Split(new string[] { ticks }, StringSplitOptions.None);
|
||||
dummyDirectory = Path.Combine(dummyRoot, cellInstanceName, ticks, string.Join(null, segments));
|
||||
if (!Directory.Exists(dummyDirectory))
|
||||
{
|
||||
_ = Directory.CreateDirectory(dummyDirectory);
|
||||
try
|
||||
{ Directory.SetLastWriteTime(Path.Combine(dummyRoot, cellInstanceName), DateTime.Now); }
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(ticks))
|
||||
{
|
||||
|
@ -64,8 +64,8 @@ public class BACKLOG : LoggingUnitTesting, IDisposable
|
||||
StringBuilder results = new();
|
||||
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
||||
{
|
||||
new("BACKLOG", "v2.60.0"),
|
||||
new("BACKLOG-EQPT", "v2.60.0"),
|
||||
new("BACKLOG", "v2.61.1"),
|
||||
new("BACKLOG-EQPT", "v2.61.1"),
|
||||
};
|
||||
string development = "http://eaf-dev.mes.infineon.com:9003/CellInstanceServiceV2";
|
||||
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
||||
|
@ -64,7 +64,7 @@ public class MESAFIBACKLOG : LoggingUnitTesting, IDisposable
|
||||
StringBuilder results = new();
|
||||
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
||||
{
|
||||
new("MESAFIBACKLOG", "v2.60.0"),
|
||||
new("MESAFIBACKLOG", "v2.61.1"),
|
||||
};
|
||||
string development = "http://eaf-dev.mes.infineon.com:9003/CellInstanceServiceV2";
|
||||
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
||||
|
@ -204,7 +204,7 @@
|
||||
<Version>0.15.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Infineon.EAF.Runtime">
|
||||
<Version>2.60.0</Version>
|
||||
<Version>2.61.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Nancy.Owin">
|
||||
<Version>2.0.0</Version>
|
||||
@ -213,7 +213,7 @@
|
||||
<Version>1.0.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Text.Json">
|
||||
<Version>8.0.5</Version>
|
||||
<Version>8.0.3</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.60.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.60.0.0")]
|
||||
[assembly: AssemblyVersion("2.61.1.0")]
|
||||
[assembly: AssemblyFileVersion("2.61.1.0")]
|
||||
|
Reference in New Issue
Block a user