Version Error Message

Using pattern ...
Tests passed
2023-01-24
Bug in yml
dotnet tool
PackageReference arrangement
nuget ^
Assembly Version
Not verified
Infineon.EAF.Runtime 2.49.0
MesEntity Placeholder
Not Tested
connectionCount
AssemblyVersion
SRP2100 = 53, //Largest
Better errror message
v2.49.2
IDescription.GetDescriptions with body
Viewer support
tasks.json
kanbn initialize
WSRequest alignment
Back to x64
mesfs.infineon.com
Infineon.EAF.Runtime 2.49.3
pool name
Kanban
net8.0
v2_52_0-Tests
editorconfig
dotnet_diagnostic
CA1862 and GetWeekOfYear for WritePDSF
gitignore
cellInstanceVersion.EdaConnection.PortNumber
Added Climatec to Test.cs
GetJobIdDirectory
Remove and
5-Other-Small
mesfs.infineon.com
Infineon.EAF.Runtime 2.49.3
pool name
Kanban
Back to x64
IDescription.GetDescriptions with body
Viewer support
tasks.json
kanbn initialize
WSRequest alignment
v2.49.2
Better errror message
SRP2100 = 53, //Largest
AssemblyVersion
connectionCount
MesEntity Placeholder
Infineon.EAF.Runtime 2.49.0
Assembly Version
dotnet tool
2023-01-24
This commit is contained in:
Mike Phares 2024-05-22 07:49:57 -07:00
parent c32489b040
commit 255ccf4280
73 changed files with 2069 additions and 966 deletions

15
.gitignore vendored
View File

@ -331,10 +331,15 @@ ASALocalRun/
## ##
## Visual Studio Code ## Visual Studio Code
## ##
.vscode/* **/.vscode/*
!.vscode/settings.json !**/.vscode/extensions.json
!.vscode/tasks.json !**/.vscode/format-report.json
!.vscode/launch.json !**/.vscode/launch.json
!.vscode/extensions.json !**/.vscode/settings.json
!**/.vscode/tasks.json
!**/.vscode/mklink.md
*.lnk *.lnk
.kanbn
Adaptation/.kanbn

172
.groovy
View File

@ -1,172 +0,0 @@
#!/usr/bin/env groovy
/* groovylint-disable CompileStatic, ConsecutiveStringConcatenation, DuplicateNumberLiteral, DuplicateStringLiteral, LineLength, NestedBlockDepth, NoDef, VariableTypeRequired */
import groovy.transform.Field
@Field String _DDrive = 'D:/'
@Field String _AssemblyName = '...'
@Field String _TargetLocation = '...'
@Field String _GitCommitSeven = '...'
@Field String _GitName = 'DEP08SIASM'
@Field String _TestProjectDirectory = 'Adaptation'
@Field String _AgentStaging = 'mestsa07ec-ecmeseaf'
@Field String _DDriveNet = "${_DDrive}Framework4.8"
@Field String _AgentProduction = 'messa08ec-ecmeseaf'
@Field String _AgentDevelopment = 'mestsa003-mesedasvc'
@Field String _ProgramFilesDotnet = 'C:/Program Files/dotnet/dotnet.exe'
@Field String _ProgramFilesMSBuild = 'C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe'
pipeline {
agent {
label env.JENKINS_ENVIRONMENT == 'Development' ? _AgentDevelopment : env.JENKINS_ENVIRONMENT == 'Staging' ? _AgentStaging : env.JENKINS_ENVIRONMENT == 'Production' ? _AgentProduction : 'Else'
}
parameters {
string(name: 'GIT_SERVER', defaultValue: env.JENKINS_ENVIRONMENT == 'Development' ? 'mestsa003.infineon.com' : 'mestsa07ec.ec.local', description: 'git server')
string(name: 'DEFAULT_FILE_SERVER', defaultValue: env.JENKINS_ENVIRONMENT == 'Development' ? 'messv02ecc1_ec_local' : 'messv02ecc1.ec.local', description: 'Default file server...')
}
stages {
stage('Git') {
steps {
bat(returnStatus: true, script: 'git init')
bat(returnStatus: true, script: 'git remote add origin \\\\' + params.GIT_SERVER + '\\Git\\' + _GitName + '.git')
bat(returnStatus: true, script: 'git pull origin master')
}
}
stage('Setup') {
steps {
script {
_AssemblyName = "${env.JOB_NAME}"
_GitCommitSeven = '1234567'
// _GitCommitSeven = env.GIT_COMMIT.substring(0, 7)
def files = findFiles(glob: '*.csproj')
if (files.length != 1) {
error("Build failed because couldn't find a *.csproj file")
}
echo """
${files[0].name}
${files[0].path}
${files[0].directory}
${files[0].length}
${files[0].lastModified}
"""
_AssemblyName = files[0].name.split('[.]csproj')[0]
_TargetLocation = "\\\\${params.DEFAULT_FILE_SERVER}\\EC_EAFRepository\\${env.JENKINS_ENVIRONMENT}\\DeploymentStorage\\Adaptation_${_AssemblyName}"
}
}
}
stage('Info') {
steps {
echo "_AssemblyName ${_AssemblyName}" // ...
echo "BUILD_NUMBER ${env.BUILD_NUMBER}" // 11
echo "DEFAULT_FILE_SERVER ${params.DEFAULT_FILE_SERVER}" // 11
echo "GIT_BRANCH ${env.GIT_BRANCH}" // origin/master
echo "GIT_COMMIT ${env.GIT_COMMIT}" // 73b814069f2cf0173a62a8228815a9bc9ba93c41
echo "GIT_SERVER ${params.GIT_SERVER}" // ...
echo "GIT_URL ${env.GIT_URL}" // D:\ProgramData\Git\....git
echo "JENKINS_ENVIRONMENT ${env.JENKINS_ENVIRONMENT}" // 11
echo "JENKINS_URL ${env.JENKINS_URL}" // http://localhost:8080/
echo "JOB_NAME ${env.JOB_NAME}" // ...
echo "WORKSPACE ${env.WORKSPACE}" // D:\.jenkins\_\...
}
}
// stage('Restore') {
// steps {
// bat(returnStatus: true, script: 'dotnet --info')
// }
// }
stage('Safe storage of app secrets') {
steps {
dir(_TestProjectDirectory) {
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
'user-secrets init')
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
'user-secrets set "BuildNumber" "' + env.BUILD_NUMBER + '"')
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
'user-secrets set "GitCommitSeven" "' + _GitCommitSeven + '"')
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
'user-secrets set "Server" "' + params.DEFAULT_FILE_SERVER + '"')
}
}
}
stage('Core Build') {
steps {
echo "Build number is ${currentBuild.number}"
dir(_TestProjectDirectory) {
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
'build --runtime win-x64 --self-contained --verbosity quiet')
}
}
}
// stage('Test') {
// options {
// timeout(time: 10, unit: 'MINUTES')
// }
// steps {
// dir(_TestProjectDirectory) {
// bat('dotnet --info')
// }
// }
// }
stage('Framework Build') {
steps {
echo "Build number is ${currentBuild.number}"
bat(returnStatus: true, script: '"' + _ProgramFilesMSBuild + '" ' +
'/target:Restore ' +
'/detailedsummary ' +
'/consoleloggerparameters:PerformanceSummary;ErrorsOnly; ' +
'/property:Configuration=Debug;TargetFrameworkVersion=v4.8 ' +
_AssemblyName + '.csproj')
bat(returnStatus: true, script: '"' + _ProgramFilesMSBuild + '" ' +
'/target:Build ' +
'/detailedsummary ' +
'/consoleloggerparameters:PerformanceSummary;ErrorsOnly; ' +
'/property:Configuration=Debug;TargetFrameworkVersion=v4.8 ' +
_AssemblyName + '.csproj')
}
}
stage('Commit Id') {
steps {
dir('bin/Debug') {
writeFile file: "${_AssemblyName}.txt", text: "${env.GIT_COMMIT}-${env.BUILD_NUMBER}-${env.GIT_URL}"
}
}
}
stage('Package') {
steps {
fileOperations([fileZipOperation(folderPath: 'bin/Debug', outputFolderPath: "${_DDriveNet}/${_GitCommitSeven}-${env.BUILD_NUMBER}-${env.JOB_NAME}-Debug")])
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*", renameFiles: false, sourceCaptureExpression: '', targetLocation: "${_DDriveNet}/${_GitCommitSeven}-${env.BUILD_NUMBER}-${env.JOB_NAME}-Debug", targetNameExpression: '')])
}
}
// stage('Force Fail') {
// steps {
// error("Build failed because of this and that..")
// }
// }
stage('Copy Files to: file-share') {
steps {
dir('bin/Debug') {
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.txt", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.dll", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.exe", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.pdb", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
}
}
}
}
post {
always {
dir('bin') {
deleteDir()
}
dir('obj') {
deleteDir()
}
dir(_TestProjectDirectory + '/bin') {
deleteDir()
}
dir(_TestProjectDirectory + '/obj') {
deleteDir()
}
// cleanWs()
}
}
}

55
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,55 @@
{
"files.eol": "\n",
"[markdown]": {
"editor.wordWrap": "off"
},
"cSpell.words": [
"PDSF",
"Syncthing"
],
"files.exclude": {
"**/node_modules": true
},
"files.watcherExclude": {
"**/node_modules": true
},
"foam.files.ignore": [
".foam/**/*",
".stfolder/**/*",
"**/_layouts/**/*",
"**/_site/**/*",
"**/.vscode/**/*",
"**/node_modules/**/*"
],
"kanbn.showBurndownButton": false,
"kanbn.showSprintButton": false,
"foam.links.hover.enable": false,
"foam.placeholders.exclude": [
".kanbn/Archive/**/*"
],
"foam.orphans.exclude": [
".journal/**/*"
],
"foam.graph.style": {
"background": "#202020",
"node": {
"wired": "green",
"wireless": "orange",
"person": "white",
"topic": "#bc2a3c",
"kanbn": "#ff7b00",
"basic-note": "#773b93",
"daily-note": "#ff9d00",
"note": "#f2cb1d",
"placeholder": "#ff9d00",
"tag": "#0494c1",
"bug": "#bc2a3c",
"epic": "#ff7b00",
"feature": "#773b93",
"issue": "#ff9d00",
"task": "#f2cb1d",
"test-case": "#ff9d00",
"user-story": "#0494c1"
}
}
}

View File

@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-reportgenerator-globaltool": {
"version": "5.1.15",
"commands": [
"reportgenerator"
]
}
}
}

View File

@ -1,3 +1,19 @@
[*.md]
end_of_line = crlf
file_header_template = unset
indent_size = 2
indent_style = space
insert_final_newline = false
root = true
tab_width = 2
[*.csproj]
end_of_line = crlf
file_header_template = unset
indent_size = 2
indent_style = space
insert_final_newline = false
root = true
tab_width = 2
[*.cs] [*.cs]
csharp_indent_block_contents = true csharp_indent_block_contents = true
csharp_indent_braces = false csharp_indent_braces = false
@ -76,14 +92,36 @@ csharp_using_directive_placement = outside_namespace
dotnet_code_quality_unused_parameters = all dotnet_code_quality_unused_parameters = all
dotnet_code_quality_unused_parameters = non_public # IDE0060: Remove unused parameter dotnet_code_quality_unused_parameters = non_public # IDE0060: Remove unused parameter
dotnet_code_quality.CAXXXX.api_surface = private, internal dotnet_code_quality.CAXXXX.api_surface = private, internal
dotnet_diagnostic.CA1816.severity = none # CA1816: Call GC.SuppressFinalize correctly
dotnet_diagnostic.CA1825.severity = warning # CA1823: Avoid zero-length array allocations dotnet_diagnostic.CA1825.severity = warning # CA1823: Avoid zero-length array allocations
dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer AsSpan over Substring
dotnet_diagnostic.CA1847.severity = none # CA1847: Use string.Contains(char) instead of string.Contains(string) with single characters
dotnet_diagnostic.CA1854.severity = warning # CA1854: Prefer a 'TryGetValue' call over a Dictionary indexer access guarded by a 'ContainsKey' check to avoid double lookup
dotnet_diagnostic.CA1860.severity = error # CA1860: Prefer comparing 'Count' to 0 rather than using 'Any()', both for clarity and for performance
dotnet_diagnostic.CA1861.severity = none # CA1861: Prefer 'static readonly' fields over constant array arguments
dotnet_diagnostic.CA1862.severity = none # CA1862: Prefer using 'string.Equals(string, StringComparison)' to perform a case-insensitive comparison, but keep in mind that this might cause subtle changes in behavior, so make sure to conduct thorough testing after applying the suggestion, or if culturally sensitive comparison is not required, consider using 'StringComparison.OrdinalIgnoreCase'
dotnet_diagnostic.CA1864.severity = none # CA1864: To avoid double lookup, call 'TryAdd' instead of calling 'Add' with a 'ContainsKey' guard
dotnet_diagnostic.CA1866.severity = none # CA1866: Use 'string.EndsWith(char)' instead of 'string.EndsWith(string)' when you have a string with a single char
dotnet_diagnostic.CA1869.severity = none # CA1869: Avoid creating a new 'JsonSerializerOptions' instance for every serialization operation. Cache and reuse instances instead.
dotnet_diagnostic.CA2254.severity = none # CA2254: The logging message template should not vary between calls to 'LoggerExtensions.LogInformation(ILogger, string?, params object?[])'
dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name
dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2"); dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2");
dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant.
dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary
dotnet_diagnostic.IDE0028.severity = none # IDE0028: Collection initialization can be simplified
dotnet_diagnostic.IDE0031.severity = warning # Use null propagation (IDE0031)
dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed
dotnet_diagnostic.IDE0049.severity = warning # Use language keywords instead of framework type names for type references (IDE0049)
dotnet_diagnostic.IDE0060.severity = warning # IDE0060: Remove unused parameter dotnet_diagnostic.IDE0060.severity = warning # IDE0060: Remove unused parameter
dotnet_diagnostic.IDE0200.severity = warning # IDE0200: Lambda expression can be removed
dotnet_diagnostic.IDE0270.severity = none # IDE0270: Null check can be simplified
dotnet_diagnostic.IDE0290.severity = none # Use primary constructor [Distance]csharp(IDE0290)
dotnet_diagnostic.IDE0300.severity = none # IDE0300: Collection initialization can be simplified
dotnet_diagnostic.IDE0301.severity = none #IDE0301: Collection initialization can be simplified
dotnet_diagnostic.IDE0305.severity = none # IDE0305: Collection initialization can be simplified
dotnet_diagnostic.SYSLIB1045.severity = none # SYSLIB1045: diagnostics for regex source generation
dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning
dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.abstract_method_should_be_pascal_case.symbols = abstract_method dotnet_naming_rule.abstract_method_should_be_pascal_case.symbols = abstract_method
@ -215,7 +253,7 @@ dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
dotnet_style_parentheses_in_other_operators = never_if_unnecessary dotnet_style_parentheses_in_other_operators = never_if_unnecessary
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
dotnet_style_predefined_type_for_locals_parameters_members = true dotnet_style_predefined_type_for_locals_parameters_members = true
dotnet_style_predefined_type_for_member_access = true dotnet_style_predefined_type_for_member_access = true:warning
dotnet_style_prefer_auto_properties = true:warning dotnet_style_prefer_auto_properties = true:warning
dotnet_style_prefer_compound_assignment = true:warning dotnet_style_prefer_compound_assignment = true:warning
dotnet_style_prefer_conditional_expression_over_assignment = false dotnet_style_prefer_conditional_expression_over_assignment = false

View File

@ -4,7 +4,7 @@
"name": ".NET Core Attach", "name": ".NET Core Attach",
"type": "coreclr", "type": "coreclr",
"request": "attach", "request": "attach",
"processId": 20908 "processId": 8084
} }
] ]
} }

5
Adaptation/.vscode/mklink.md vendored Normal file
View File

@ -0,0 +1,5 @@
# mklink
```bash
mklink /J "T:\DEP08SIHTRPLC\06_SourceCode\DEP08SIHTRPLC\Adaptation\.kanbn" "D:\5-Other-Small\Kanban\DEP08SIHTRPLC"
```

View File

@ -1,4 +1,7 @@
{ {
"[markdown]": {
"editor.wordWrap": "off"
},
"cSpell.words": [ "cSpell.words": [
"Analyte", "Analyte",
"CICN", "CICN",
@ -52,6 +55,7 @@
"XRDXRR", "XRDXRR",
"XRDXY" "XRDXY"
], ],
"coverage-gutters.coverageBaseDir": "../../../../DEP08SIASM/05_TestResults/TestResults/**",
"workbench.colorCustomizations": { "workbench.colorCustomizations": {
"activityBar.activeBackground": "#7ea1d9", "activityBar.activeBackground": "#7ea1d9",
"activityBar.activeBorder": "#f8e6ed", "activityBar.activeBorder": "#f8e6ed",

104
Adaptation/.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,104 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "Test-Debug",
"command": "dotnet",
"type": "process",
"args": [
"test",
"-c",
"Debug"
],
"problemMatcher": "$msCompile"
},
{
"label": "Test-Release",
"command": "dotnet",
"type": "process",
"args": [
"test",
"-c",
"Release"
],
"problemMatcher": "$msCompile"
},
{
"label": "Format",
"command": "dotnet",
"type": "process",
"args": [
"format",
"--report",
".vscode",
"--verbosity",
"detailed",
"--severity",
"warn"
],
"problemMatcher": "$msCompile"
},
{
"label": "Nuget Clear",
"command": "dotnet",
"type": "process",
"args": [
"nuget",
"locals",
"all",
"--clear"
],
"problemMatcher": "$msCompile"
},
{
"label": "MSBuild for EAF Deployment Packages",
"command": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe",
"type": "process",
"args": [
"/target:Build",
"/restore:True",
"/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json",
"/detailedsummary",
"/consoleloggerparameters:PerformanceSummary;ErrorsOnly;",
"/property:Configuration=Debug;TargetFrameworkVersion=v4.8",
"../DEP08SIASM.csproj"
],
"problemMatcher": "$msCompile"
},
{
"label": "File-Folder-Helper AOT s M .Kanbn Tasks",
"type": "shell",
"command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe s M T:/DEP08SIASM/06_SourceCode/DEP08SIASM/Adaptation -s T:/DEP08SIASM/06_SourceCode/DEP08SIASM/Adaptation/.kanbn/tasks",
"problemMatcher": []
},
{
"label": "Kanbn Console",
"type": "npm",
"script": "kanbn.board",
"problemMatcher": []
},
{
"label": "Kanbn Write Boad",
"type": "shell",
"command": "& kanbn board -j | L:/Git/kanbn2md/kanbn2md.exe >.kanbn/board.md",
"problemMatcher": []
},
{
"label": "Kanbn Write json",
"type": "npm",
"script": "kanbn.board.json",
"problemMatcher": []
}
]
}

View File

@ -0,0 +1 @@
ECHO is on.

View File

@ -8,10 +8,9 @@
<PropertyGroup> <PropertyGroup>
<ImplicitUsings>disable</ImplicitUsings> <ImplicitUsings>disable</ImplicitUsings>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<LangVersion>10.0</LangVersion>
<Nullable>disable</Nullable> <Nullable>disable</Nullable>
<RuntimeIdentifier>win-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<VSTestLogger>trx</VSTestLogger> <VSTestLogger>trx</VSTestLogger>
@ -33,49 +32,11 @@
<DefineConstants>Linux</DefineConstants> <DefineConstants>Linux</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" /> <RuntimeHostConfigurationOption Include="AssemblyName" Value="DEP08SIASM" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="6.0.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" /> <PackageReference Include="coverlet.collector" Version="6.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" /> <PackageReference Include="FFMpegCore" Version="5.1.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
<PackageReference Include="System.Data.OleDb" Version="6.0.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.3" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="System.Text.Json" Version="6.0.3" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FFMpegCore" Version="4.8.0" />
<PackageReference Include="Infineon.Yoda" Version="5.4.1" />
<PackageReference Include="Instances" Version="2.0.0" />
<PackageReference Include="RoboSharp" Version="1.2.7" />
<PackageReference Include="Tesseract" Version="4.1.1" />
<PackageReference Include="Tibco.Rendezvous" Version="8.5.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="External.Common.Logging.Core" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="External.Common.Logging" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="External.log4net" Version="2.0.8"><NoWarn>NU1701</NoWarn></PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="IKVM.AWT.WinForms" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> <PackageReference Include="IKVM.AWT.WinForms" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="IKVM.OpenJDK.Core" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> <PackageReference Include="IKVM.OpenJDK.Core" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="IKVM.OpenJDK.Media" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> <PackageReference Include="IKVM.OpenJDK.Media" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
@ -83,6 +44,41 @@
<PackageReference Include="IKVM.OpenJDK.Util" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> <PackageReference Include="IKVM.OpenJDK.Util" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="IKVM.OpenJDK.XML.API" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> <PackageReference Include="IKVM.OpenJDK.XML.API" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="IKVM.Runtime" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> <PackageReference Include="IKVM.Runtime" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="Instances" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="8.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.3.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
<PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="RoboSharp" Version="1.5.1" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
<PackageReference Include="System.Data.OleDb" Version="8.0.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="System.Drawing.Common" Version="8.0.5" />
<PackageReference Include="System.Text.Json" Version="8.0.3" />
<PackageReference Include="Tesseract" Version="5.2.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Tibco.Rendezvous.DotNetCore" Version="8.5.0" />
<PackageReference Include="Infineon.Yoda.DotNetCore" Version="5.4.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Infineon.Mesa.PDF.Text.Stripper" Version="4.8.0.1"><NoWarn>NU1701</NoWarn></PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="External.Common.Logging.Core" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="External.Common.Logging" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="External.log4net" Version="2.0.8"><NoWarn>NU1701</NoWarn></PackageReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="appsettings.json"> <None Include="appsettings.json">

View File

@ -0,0 +1 @@
ECHO is on.

View File

@ -9,14 +9,14 @@ namespace Adaptation.FileHandlers;
public class CellInstanceConnectionName public class CellInstanceConnectionName
{ {
internal static IFileRead Get(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) internal static IFileRead Get(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, int? connectionCount)
{ {
IFileRead result = cellInstanceConnectionName switch IFileRead result = cellInstanceConnectionName switch
{ {
nameof(DownloadJpegFile) => new DownloadJpegFile.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted), nameof(DownloadJpegFile) => new DownloadJpegFile.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
nameof(jpeg) => new jpeg.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted), nameof(jpeg) => new jpeg.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
nameof(MonitorApplication) => new MonitorApplication.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted), nameof(MonitorApplication) => new MonitorApplication.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
nameof(OpenInsight) => new OpenInsight.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted), nameof(OpenInsight) => new OpenInsight.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
_ => throw new Exception($"\"{cellInstanceConnectionName}\" not mapped") _ => throw new Exception($"\"{cellInstanceConnectionName}\" not mapped")
}; };
return result; return result;

View File

@ -20,8 +20,8 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly string _FFmpegFileName; private readonly string _FFmpegFileName;
private readonly string _StaticFileServer; private readonly string _StaticFileServer;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted) base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{ {
_MinFileLength = 10; _MinFileLength = 10;
_NullData = string.Empty; _NullData = string.Empty;
@ -111,14 +111,7 @@ public class FileRead : Shared.FileRead, IFileRead
return results; return results;
} }
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime) private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime) => throw new Exception(string.Concat("See ", nameof(Callback)));
{
if (reportFullPath is null)
{ }
if (dateTime == DateTime.MinValue)
{ }
throw new Exception(string.Concat("See ", nameof(Callback)));
}
private void DownloadJpegFileSynchronously() private void DownloadJpegFileSynchronously()
{ {

View File

@ -18,8 +18,8 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly string _MonitorApplicationSite; private readonly string _MonitorApplicationSite;
private readonly string _MonitorApplicationResource; private readonly string _MonitorApplicationResource;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted) base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{ {
_MinFileLength = 10; _MinFileLength = 10;
_NullData = string.Empty; _NullData = string.Empty;
@ -110,9 +110,10 @@ public class FileRead : Shared.FileRead, IFileRead
} }
private void SendData(DateTime dateTime, List<jpeg.Description> descriptions) private void SendData(DateTime dateTime, List<jpeg.Description> descriptions)
#pragma warning restore IDE0060
{ {
if (dateTime == DateTime.MinValue) if (dateTime == DateTime.MinValue)
{ } throw new Exception();
MonIn monIn = MonIn.GetInstance(); MonIn monIn = MonIn.GetInstance();
int value = int.TryParse(descriptions[0].Lot, out int check) ? check : 0; int value = int.TryParse(descriptions[0].Lot, out int check) ? check : 0;
string performanceName = string.Concat(_MonitorApplicationResource, "_", _Logistics.MesEntity); string performanceName = string.Concat(_MonitorApplicationResource, "_", _Logistics.MesEntity);

View File

@ -19,8 +19,8 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly string _MemoryPath; private readonly string _MemoryPath;
private readonly HttpClient _HttpClient; private readonly HttpClient _HttpClient;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted) base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{ {
_MinFileLength = 10; _MinFileLength = 10;
_NullData = string.Empty; _NullData = string.Empty;
@ -113,9 +113,10 @@ public class FileRead : Shared.FileRead, IFileRead
} }
private void SendData(DateTime dateTime, List<jpeg.Description> descriptions) private void SendData(DateTime dateTime, List<jpeg.Description> descriptions)
#pragma warning restore IDE0060
{ {
if (dateTime == DateTime.MinValue) if (dateTime == DateTime.MinValue)
{ } throw new Exception();
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00"); string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}"; string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
string logisticsSequenceMemoryDirectory = Path.Combine(_MemoryPath, _EquipmentType, "Source", weekDirectory, _Logistics.Sequence.ToString()); string logisticsSequenceMemoryDirectory = Path.Combine(_MemoryPath, _EquipmentType, "Source", weekDirectory, _Logistics.Sequence.ToString());

View File

@ -35,6 +35,8 @@ public class Description : IDescription, Shared.Properties.IDescription
public int TotalDelta { get; set; } public int TotalDelta { get; set; }
public string ClosestMatchFileName { get; set; } public string ClosestMatchFileName { get; set; }
public string RDS { get; set; }
string IDescription.GetEventDescription() => "File Has been read and parsed"; string IDescription.GetEventDescription() => "File Has been read and parsed";
List<string> IDescription.GetNames(IFileRead fileRead, Logistics logistics) List<string> IDescription.GetNames(IFileRead fileRead, Logistics logistics)
@ -136,7 +138,7 @@ public class Description : IDescription, Shared.Properties.IDescription
{ {
List<IDescription> results = new(); List<IDescription> results = new();
if (iProcessData is null || !iProcessData.Details.Any() || iProcessData is not ProcessData processData) if (iProcessData is null || iProcessData.Details.Count == 0 || iProcessData is not ProcessData processData)
results.Add(GetDefault(fileRead, logistics)); results.Add(GetDefault(fileRead, logistics));
else else
{ {
@ -222,4 +224,6 @@ public class Description : IDescription, Shared.Properties.IDescription
return result; return result;
} }
internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt";
} }

View File

@ -15,6 +15,7 @@ namespace Adaptation.FileHandlers.jpeg;
public class FileRead : Shared.FileRead, IFileRead public class FileRead : Shared.FileRead, IFileRead
{ {
private long? _TickOffset;
protected long _LastChange; protected long _LastChange;
protected string _LastText; protected string _LastText;
protected readonly int _EndX; protected readonly int _EndX;
@ -29,8 +30,8 @@ public class FileRead : Shared.FileRead, IFileRead
protected readonly Dictionary<string, string> _Reactors; protected readonly Dictionary<string, string> _Reactors;
protected readonly List<Tuple<string, Color[]>> _ColorCollections; protected readonly List<Tuple<string, Color[]>> _ColorCollections;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), true, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted) base(new Description(), true, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{ {
_MinFileLength = 36790; _MinFileLength = 36790;
_NullData = string.Empty; _NullData = string.Empty;
@ -157,7 +158,8 @@ public class FileRead : Shared.FileRead, IFileRead
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime) private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{ {
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>()); Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
_Logistics = new Logistics(this, reportFullPath, useSplitForMID: true); _TickOffset ??= new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
_Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true);
SetFileParameterLotIDToLogisticsMID(); SetFileParameterLotIDToLogisticsMID();
if (_Logistics.FileInfo.Length < _MinFileLength) if (_Logistics.FileInfo.Length < _MinFileLength)
results.Item4.Add(_Logistics.FileInfo); results.Item4.Add(_Logistics.FileInfo);
@ -174,7 +176,7 @@ public class FileRead : Shared.FileRead, IFileRead
SetFileParameterLotID(mid); SetFileParameterLotID(mid);
string processJobID = iProcessData.GetCurrentReactor(this, _Logistics, _Reactors); string processJobID = iProcessData.GetCurrentReactor(this, _Logistics, _Reactors);
_Logistics.Update(mid, processJobID); _Logistics.Update(mid, processJobID);
if (!iProcessData.Details.Any()) if (iProcessData.Details.Count == 0)
throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks)); throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks));
if (processData.Text == _LastText && _LastChange > DateTime.Now.AddMinutes(-30).Ticks) if (processData.Text == _LastText && _LastChange > DateTime.Now.AddMinutes(-30).Ticks)
File.Delete(reportFullPath); File.Delete(reportFullPath);

View File

@ -7,8 +7,10 @@ using System.Data;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
using Tesseract;
namespace Adaptation.FileHandlers.jpeg; namespace Adaptation.FileHandlers.jpeg;
@ -32,8 +34,6 @@ public class ProcessData : IProcessData
public ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, int startX, int startY, int endX, int endY, int offSetX, int offSetY, Size size, List<Tuple<string, Color[]>> colorCollections) public ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, int startX, int startY, int endX, int endY, int offSetX, int offSetY, Size size, List<Tuple<string, Color[]>> colorCollections)
{ {
if (logistics is null)
{ }
JobID = logistics.JobID; JobID = logistics.JobID;
fileInfoCollection.Clear(); fileInfoCollection.Clear();
_Details = new List<object>(); _Details = new List<object>();
@ -330,4 +330,157 @@ public class ProcessData : IProcessData
return results; return results;
} }
#pragma warning disable CA1416
private static MemoryStream GetMemoryStream(System.Drawing.Imaging.ImageFormat imageFormat, Bitmap bitmap, int startX, int startY, int endX, int endY, int offSetX, int offSetY)
{
Color color;
int negitiveGrayScale;
MemoryStream result = new();
int startXValue = startX + offSetX;
int startYValue = startY + offSetY;
int endXValue = endX + offSetX;
int endYValue = endY + offSetY;
using Bitmap selectedBitmap = new(endXValue - startXValue, endYValue - startYValue);
for (int x = startXValue; x < endXValue; x++)
{
for (int y = startYValue; y < endYValue; y++)
{
color = bitmap.GetPixel(x, y);
negitiveGrayScale = 255 - (int)((color.R * 0.3) + (color.G * 0.59) + (color.B * 0.11));
if (negitiveGrayScale < 162)
selectedBitmap.SetPixel(x - startXValue, y - startYValue, Color.FromArgb(color.A, 0, 0, 0));
else
selectedBitmap.SetPixel(x - startXValue, y - startYValue, Color.FromArgb(color.A, 255, 255, 255));
}
}
selectedBitmap.Save(result, imageFormat);
return result;
}
private static List<MemoryStream> GetMemoryStreams(string reportFullPath, string extension)
{
List<MemoryStream> results = new();
System.Drawing.Imaging.ImageFormat imageFormat = Get(extension);
using Bitmap? bitmap = Image.FromFile(reportFullPath) as Bitmap;
if (bitmap is null)
throw new Exception($"Couldn't load image from <{reportFullPath}>");
results.Add(GetMemoryStream(imageFormat, bitmap, 6, 130, 791, 953, 0, 0));
results.Add(GetMemoryStream(imageFormat, bitmap, 48, 795, 359, 869, 0, 0));
results.Add(GetMemoryStream(imageFormat, bitmap, 376, 814, 430, 832, 0, 0));
results.Add(GetMemoryStream(imageFormat, bitmap, 373, 793, 433, 874, 0, 0));
return results;
}
public static List<(float, string, List<string>)> Parse(string reportFullPath)
{
List<(float, string, List<string>)> results = new();
string text;
float pageMeanConfidence;
MemoryStream memoryStream;
List<string> blocks = new();
const string extension = ".tiff";
StringBuilder stringBuilder = new();
using TesseractEngine engine = new(string.Empty, "eng", EngineMode.Default);
List<MemoryStream> memoryStreams = GetMemoryStreams(reportFullPath, extension);
for (int i = 0; i < memoryStreams.Count; i++)
{
_ = stringBuilder.Clear();
memoryStream = memoryStreams[i];
using Pix img = Pix.LoadFromMemory(memoryStream.GetBuffer());
using Page page = engine.Process(img);
text = page.GetText();
pageMeanConfidence = page.GetMeanConfidence();
using ResultIterator iter = page.GetIterator();
iter.Begin();
do
{
do
{
do
{
do
{
_ = stringBuilder.Append(iter.GetText(PageIteratorLevel.Word)).Append(' ');
if (iter.IsAtFinalOf(PageIteratorLevel.TextLine, PageIteratorLevel.Word) && stringBuilder.Length > 0)
{
blocks.Add(stringBuilder.ToString());
_ = stringBuilder.Clear();
}
} while (iter.Next(PageIteratorLevel.TextLine, PageIteratorLevel.Word));
if (iter.IsAtFinalOf(PageIteratorLevel.Para, PageIteratorLevel.TextLine))
_ = stringBuilder.AppendLine();
} while (iter.Next(PageIteratorLevel.Para, PageIteratorLevel.TextLine));
} while (iter.Next(PageIteratorLevel.Block, PageIteratorLevel.Para));
} while (iter.Next(PageIteratorLevel.Block));
if (stringBuilder.Length > 0)
blocks.Add(stringBuilder.ToString());
results.Add(new(pageMeanConfidence, text, blocks));
// if (!fileRead.IsEAFHosted)
// {
// fileInfoCollection.Add(new FileInfo(saveFileName));
SaveToFile(extension, $"{reportFullPath}{i}{extension}", memoryStream);
// }
}
return results;
}
#pragma warning restore CA1416
public static (float, string, List<string>) Parse(string reportFullPath, List<FileInfo> fileInfoCollection, int startX, int startY, int endX, int endY, int offSetX, int offSetY)
{
(float, string, List<string>) result;
List<string> blocks = new();
StringBuilder stringBuilder = new();
using TesseractEngine engine = new(string.Empty, "eng", EngineMode.Default);
using Pix img = Pix.LoadFromFile(reportFullPath);
using Page page = engine.Process(img);
string text = page.GetText();
float pageMeanConfidence = page.GetMeanConfidence();
using ResultIterator iter = page.GetIterator();
iter.Begin();
do
{
do
{
do
{
do
{
_ = stringBuilder.Append(iter.GetText(PageIteratorLevel.Word)).Append(' ');
if (iter.IsAtFinalOf(PageIteratorLevel.TextLine, PageIteratorLevel.Word) && stringBuilder.Length > 0)
{
blocks.Add(stringBuilder.ToString());
_ = stringBuilder.Clear();
}
} while (iter.Next(PageIteratorLevel.TextLine, PageIteratorLevel.Word));
if (iter.IsAtFinalOf(PageIteratorLevel.Para, PageIteratorLevel.TextLine))
_ = stringBuilder.AppendLine();
} while (iter.Next(PageIteratorLevel.Para, PageIteratorLevel.TextLine));
} while (iter.Next(PageIteratorLevel.Block, PageIteratorLevel.Para));
} while (iter.Next(PageIteratorLevel.Block));
if (stringBuilder.Length > 0)
blocks.Add(stringBuilder.ToString());
result = new(pageMeanConfidence, text, blocks);
return result;
}
private void Parse(IFileRead fileRead, List<FileInfo> fileInfoCollection, int startX, int startY, int endX, int endY, int offSetX, int offSetY)
{
(float pageMeanConfidence, string text, List<string> blocks) = Parse(fileRead.ReportFullPath, fileInfoCollection, startX, startY, endX, endY, offSetX, offSetY);
_Log.Debug(string.Format("Mean confidence: {0}", pageMeanConfidence));
_Log.Debug(string.Format("Text (GetText): \r\n{0}", text));
_Log.Debug("Text (iterator):");
if (blocks.Count == 0)
_Details.Add(text);
else
{
blocks = (from l in blocks where l.Split(':').Length == 3 select l).ToList();
if (blocks.Count == 0)
_Details.Add(text);
else
_Details.Add(blocks[0]);
}
}
} }

View File

@ -18,22 +18,13 @@ public class MonIn : IMonIn, IDisposable
public static MonIn GetInstance(string url = "http://moninhttp.{0}.infineon.com/input/text") public static MonIn GetInstance(string url = "http://moninhttp.{0}.infineon.com/input/text")
{ {
MonIn instance; MonIn instance;
if (_Instances.ContainsKey(url))
{
instance = _Instances[url];
}
else
{
lock (_Instances) lock (_Instances)
{ {
if (!_Instances.ContainsKey(url)) if (_Instances.TryGetValue(url, out instance))
{ {
instance = new MonIn(url); instance = new MonIn(url);
_Instances.Add(url, instance); _Instances.Add(url, instance);
} }
else
instance = _Instances[url];
}
} }
return instance; return instance;
} }

View File

@ -12,6 +12,7 @@ public class Description : IDescription, Properties.IDescription
public int Test { get; set; } public int Test { get; set; }
public int Count { get; set; } public int Count { get; set; }
public int Index { get; set; } public int Index { get; set; }
public string RDS { get; set; }
// //
public string EventName { get; set; } public string EventName { get; set; }
public string NullData { get; set; } public string NullData { get; set; }
@ -109,6 +110,42 @@ public class Description : IDescription, Properties.IDescription
List<IDescription> IDescription.GetDescriptions(IFileRead fileRead, Logistics logistics, List<Test> tests, IProcessData iProcessData) List<IDescription> IDescription.GetDescriptions(IFileRead fileRead, Logistics logistics, List<Test> tests, IProcessData iProcessData)
{ {
List<IDescription> results = new(); List<IDescription> results = new();
if (iProcessData is null || iProcessData.Details.Count == 0)
results.Add(GetDefault(fileRead, logistics));
else
{
string nullData;
Description description;
object configDataNullData = fileRead.NullData;
if (configDataNullData is null)
nullData = string.Empty;
else
nullData = configDataNullData.ToString();
for (int i = 0; i < iProcessData.Details.Count; i++)
{
if (iProcessData.Details[i] is null)
continue;
description = new Description
{
Test = (int)tests[i],
Count = tests.Count,
Index = i,
//
EventName = fileRead.EventName,
NullData = nullData,
JobID = fileRead.CellInstanceName,
Sequence = logistics.Sequence.ToString(),
MesEntity = logistics.MesEntity,
ReportFullPath = logistics.ReportFullPath,
ProcessJobID = logistics.ProcessJobID,
MID = logistics.MID,
//
Date = DateTime.Now.ToString(GetDateFormat()),
RDS = string.Empty,
};
results.Add(description);
}
}
return results; return results;
} }
@ -139,4 +176,6 @@ public class Description : IDescription, Properties.IDescription
return result; return result;
} }
internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt";
} }

View File

@ -63,7 +63,7 @@ public class FileRead : Properties.IFileRead
string Properties.IFileRead.CellInstanceConnectionName => _CellInstanceConnectionName; string Properties.IFileRead.CellInstanceConnectionName => _CellInstanceConnectionName;
string Properties.IFileRead.ParameterizedModelObjectDefinitionType => _ParameterizedModelObjectDefinitionType; string Properties.IFileRead.ParameterizedModelObjectDefinitionType => _ParameterizedModelObjectDefinitionType;
public FileRead(IDescription description, bool isEvent, ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) public FileRead(IDescription description, bool isEvent, ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted)
{ {
_SMTP = smtp; _SMTP = smtp;
_IsEvent = isEvent; _IsEvent = isEvent;
@ -106,7 +106,7 @@ public class FileRead : Properties.IFileRead
throw new Exception(cellInstanceConnectionName); throw new Exception(cellInstanceConnectionName);
if (string.IsNullOrEmpty(equipmentDictionaryName) && isEvent) if (string.IsNullOrEmpty(equipmentDictionaryName) && isEvent)
throw new Exception(cellInstanceConnectionName); throw new Exception(cellInstanceConnectionName);
if (!string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent) if (!string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent && connectionCount > 1)
throw new Exception(cellInstanceConnectionName); throw new Exception(cellInstanceConnectionName);
// if (string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent) // if (string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent)
// throw new Exception(cellInstanceConnectionName); // throw new Exception(cellInstanceConnectionName);
@ -163,7 +163,7 @@ public class FileRead : Properties.IFileRead
protected static ModelObjectParameterDefinition[] GetProperties(string cellInstanceConnectionName, IList<ModelObjectParameterDefinition> modelObjectParameters, string propertyNamePrefix) protected static ModelObjectParameterDefinition[] GetProperties(string cellInstanceConnectionName, IList<ModelObjectParameterDefinition> modelObjectParameters, string propertyNamePrefix)
{ {
ModelObjectParameterDefinition[] results = (from l in modelObjectParameters where l.Name.StartsWith(propertyNamePrefix) select l).ToArray(); ModelObjectParameterDefinition[] results = (from l in modelObjectParameters where l.Name.StartsWith(propertyNamePrefix) select l).ToArray();
if (!results.Any()) if (results.Length == 0)
throw new Exception(cellInstanceConnectionName); throw new Exception(cellInstanceConnectionName);
return results; return results;
} }
@ -171,7 +171,7 @@ public class FileRead : Properties.IFileRead
protected static ModelObjectParameterDefinition[] GetProperties(string cellInstanceConnectionName, IList<ModelObjectParameterDefinition> modelObjectParameters, string propertyNamePrefix, string propertyNameSuffix) protected static ModelObjectParameterDefinition[] GetProperties(string cellInstanceConnectionName, IList<ModelObjectParameterDefinition> modelObjectParameters, string propertyNamePrefix, string propertyNameSuffix)
{ {
ModelObjectParameterDefinition[] results = (from l in modelObjectParameters where l.Name.StartsWith(propertyNamePrefix) && l.Name.EndsWith(propertyNameSuffix) select l).ToArray(); ModelObjectParameterDefinition[] results = (from l in modelObjectParameters where l.Name.StartsWith(propertyNamePrefix) && l.Name.EndsWith(propertyNameSuffix) select l).ToArray();
if (!results.Any()) if (results.Length == 0)
throw new Exception(cellInstanceConnectionName); throw new Exception(cellInstanceConnectionName);
return results; return results;
} }
@ -203,7 +203,7 @@ public class FileRead : Properties.IFileRead
} }
lock (threadExceptions) lock (threadExceptions)
{ {
if (threadExceptions.Any()) if (threadExceptions.Count != 0)
{ {
foreach (Exception item in threadExceptions) foreach (Exception item in threadExceptions)
_Log.Error(string.Concat(item.Message, Environment.NewLine, Environment.NewLine, item.StackTrace)); _Log.Error(string.Concat(item.Message, Environment.NewLine, Environment.NewLine, item.StackTrace));
@ -241,7 +241,7 @@ public class FileRead : Properties.IFileRead
if (!_IsDuplicator) if (!_IsDuplicator)
WriteAllLines(to, results); WriteAllLines(to, results);
} }
if (extractResults is not null && extractResults.Item4 is not null && extractResults.Item4.Any()) if (extractResults is not null && extractResults.Item4 is not null && extractResults.Item4.Count != 0)
{ {
string itemFile; string itemFile;
List<string> directories = new(); List<string> directories = new();
@ -260,24 +260,25 @@ public class FileRead : Properties.IFileRead
return results; return results;
} }
protected static string GetTupleFile(Logistics logistics, Properties.IScopeInfo scopeInfo, string duplicateDirectory) protected static string GetTupleFile<T>(Logistics logistics, List<T> descriptions, Properties.IScopeInfo scopeInfo, string duplicateDirectory, string duplicateFile) where T : Properties.IDescription
{ {
string result; string result;
string rds; string rds;
string fileName;
string dateValue; string dateValue;
string datePlaceholder; string rdsPlaceholder = "%RDS%";
string[] segments = logistics.MID.Split('-'); string mesEntityPlaceholder = "%MesEntity%";
if (segments.Length < 2) if (descriptions.Count == 0 || string.IsNullOrEmpty(descriptions[0].RDS))
rds = "%RDS%"; rds = logistics.MID;
else else
rds = segments[1]; rds = descriptions[0].RDS;
segments = scopeInfo.FileName.Split(new string[] { "DateTime:" }, StringSplitOptions.RemoveEmptyEntries); string[] segments = scopeInfo.FileName.Split(new string[] { "DateTime:" }, StringSplitOptions.RemoveEmptyEntries);
if (segments.Length == 0) if (segments.Length == 0)
result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileNameWithoutExtension.Replace("%RDS%", rds)); result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileNameWithoutExtension.Replace(rdsPlaceholder, rds).Replace(mesEntityPlaceholder, logistics.MesEntity));
else else
{ {
datePlaceholder = "%DateTime%";
segments = segments[1].Split('%'); segments = segments[1].Split('%');
string datePlaceholder = "%DateTime%";
dateValue = logistics.DateTimeFromSequence.ToString(segments[0]); dateValue = logistics.DateTimeFromSequence.ToString(segments[0]);
foreach (string segment in scopeInfo.FileName.Split('%')) foreach (string segment in scopeInfo.FileName.Split('%'))
{ {
@ -285,18 +286,23 @@ public class FileRead : Properties.IFileRead
continue; continue;
datePlaceholder = string.Concat('%', segment, '%'); datePlaceholder = string.Concat('%', segment, '%');
} }
result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileName.Replace("%RDS%", rds).Replace(datePlaceholder, dateValue)); fileName = scopeInfo.FileName.Replace(rdsPlaceholder, rds).Replace(mesEntityPlaceholder, logistics.MesEntity).Replace(datePlaceholder, dateValue);
if (!duplicateFile.Contains("Viewer"))
result = Path.Combine(duplicateDirectory, fileName);
else
result = Path.Combine(duplicateDirectory, $"Viewer_{fileName}");
} }
if (result.Contains('%')) if (result.Contains('%'))
throw new Exception("Placeholder exists!"); throw new Exception("Placeholder exists!");
return result; return result;
} }
protected void WaitForFileConsumption(string sourceDirectoryCloaking, Logistics logistics, DateTime dateTime, string successDirectory, string duplicateDirectory, string duplicateFile, List<(Properties.IScopeInfo, string)> tuples) protected void WaitForFileConsumption<T>(string sourceDirectoryCloaking, Logistics logistics, DateTime dateTime, List<T> descriptions, string successDirectory, string duplicateDirectory, string duplicateFile, List<(Properties.IScopeInfo, string)> collection) where T : Properties.IDescription
{ {
bool check; bool check;
long preWait; long preWait;
string tupleFile; string tupleFile;
string tupleFileName = string.Empty;
List<string> duplicateFiles = new(); List<string> duplicateFiles = new();
StringBuilder stringBuilder = new(); StringBuilder stringBuilder = new();
List<int> consumedFileIndices = new(); List<int> consumedFileIndices = new();
@ -306,26 +312,28 @@ public class FileRead : Properties.IFileRead
preWait = dateTime.AddMilliseconds(1234).Ticks; preWait = dateTime.AddMilliseconds(1234).Ticks;
else else
preWait = dateTime.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks; preWait = dateTime.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
if (!tuples.Any()) if (collection.Count == 0)
duplicateFiles.Add(duplicateFile); duplicateFiles.Add(duplicateFile);
string fileName = Path.GetFileNameWithoutExtension(logistics.ReportFullPath); string fileName = Path.GetFileNameWithoutExtension(logistics.ReportFullPath);
string successFile = string.Concat(successDirectory, @"\", Path.GetFileName(logistics.ReportFullPath)); string successFile = string.Concat(successDirectory, @"\", Path.GetFileName(logistics.ReportFullPath));
foreach ((Properties.IScopeInfo scopeInfo, string text) in tuples) foreach ((Properties.IScopeInfo scopeInfo, string text) in collection)
{ {
if (scopeInfo.FileName.StartsWith(@"\")) if (scopeInfo.FileName.StartsWith(@"\"))
tupleFile = scopeInfo.FileName; tupleFile = scopeInfo.FileName;
else if (!scopeInfo.FileName.Contains('%')) else if (!scopeInfo.FileName.Contains('%'))
tupleFile = string.Concat(duplicateDirectory, @"\", fileName, "_", scopeInfo.FileNameWithoutExtension, ".pdsfc"); tupleFile = string.Concat(duplicateDirectory, @"\", fileName, "_", scopeInfo.FileNameWithoutExtension, ".pdsfc");
else else
tupleFile = GetTupleFile(logistics, scopeInfo, duplicateDirectory); tupleFile = GetTupleFile(logistics, descriptions, scopeInfo, duplicateDirectory, duplicateFile);
tupleFileName = Path.GetFileNameWithoutExtension(tupleFile).Split('.')[0];
duplicateFiles.Add(tupleFile); duplicateFiles.Add(tupleFile);
if (_IsEAFHosted)
File.WriteAllText(tupleFile, text); File.WriteAllText(tupleFile, text);
} }
for (short i = 0; i < short.MaxValue; i++) for (short i = 0; i < short.MaxValue; i++)
{ {
if (DateTime.Now.Ticks > preWait) if (DateTime.Now.Ticks > preWait)
break; break;
Thread.Sleep(500); Thread.Sleep(100);
} }
if (!moreThanAnHour) if (!moreThanAnHour)
{ {
@ -340,7 +348,17 @@ public class FileRead : Properties.IFileRead
for (int i = 0; i < duplicateFiles.Count; i++) for (int i = 0; i < duplicateFiles.Count; i++)
{ {
if (!File.Exists(duplicateFiles[i])) if (!File.Exists(duplicateFiles[i]))
{
if (string.IsNullOrEmpty(tupleFileName))
consumedFileIndices.Add(i); consumedFileIndices.Add(i);
else if (duplicateFiles.All(l => Path.GetFileNameWithoutExtension(l).Split('.')[0] == tupleFileName))
{
for (int j = 0; j < duplicateFiles.Count; j++)
consumedFileIndices.Add(j);
}
else
consumedFileIndices.Add(i);
}
} }
if (consumedFileIndices.Count == duplicateFiles.Count) if (consumedFileIndices.Count == duplicateFiles.Count)
break; break;
@ -361,7 +379,7 @@ public class FileRead : Properties.IFileRead
} }
throw new Exception(string.Concat("After {", _BreakAfterSeconds, "} seconds, right side of {", sourceDirectoryCloaking, "} didn't consume file(s) ", stringBuilder)); throw new Exception(string.Concat("After {", _BreakAfterSeconds, "} seconds, right side of {", sourceDirectoryCloaking, "} didn't consume file(s) ", stringBuilder));
} }
Thread.Sleep(500); Thread.Sleep(250);
} }
} }
} }
@ -404,10 +422,12 @@ public class FileRead : Properties.IFileRead
protected void WritePDSF(IFileRead fileRead, JsonElement[] jsonElements) protected void WritePDSF(IFileRead fileRead, JsonElement[] jsonElements)
{ {
string directory; string directory;
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
if (!_CellInstanceConnectionName.StartsWith(_CellInstanceName) && _CellInstanceConnectionNameBase == _EquipmentType) if (!_CellInstanceConnectionName.StartsWith(_CellInstanceName) && _CellInstanceConnectionNameBase == _EquipmentType)
directory = Path.Combine(_TracePath, _EquipmentType, "Target", _CellInstanceName, _CellInstanceConnectionName); directory = Path.Combine(_TracePath, _EquipmentType, "Target", weekDirectory, _CellInstanceName, _CellInstanceConnectionName);
else else
directory = Path.Combine(_TracePath, _EquipmentType, "Source", _CellInstanceName, _CellInstanceConnectionName); directory = Path.Combine(_TracePath, _EquipmentType, "Source", weekDirectory, _CellInstanceName, _CellInstanceConnectionName);
if (!Directory.Exists(directory)) if (!Directory.Exists(directory))
_ = Directory.CreateDirectory(directory); _ = Directory.CreateDirectory(directory);
string file = Path.Combine(directory, string.Concat(_Logistics.MesEntity, "_", _Logistics.Sequence, ".ipdsf")); string file = Path.Combine(directory, string.Concat(_Logistics.MesEntity, "_", _Logistics.Sequence, ".ipdsf"));
@ -442,6 +462,7 @@ public class FileRead : Properties.IFileRead
protected void TriggerEvents(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, List<string> headerNames, Dictionary<string, string> keyValuePairs) protected void TriggerEvents(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, List<string> headerNames, Dictionary<string, string> keyValuePairs)
{ {
object value; object value;
string segments;
string description; string description;
List<object[]> list; List<object[]> list;
for (int i = 0; i < extractResults.Item3.Length; i++) for (int i = 0; i < extractResults.Item3.Length; i++)
@ -449,10 +470,10 @@ public class FileRead : Properties.IFileRead
_Log.Debug(string.Concat("TriggerEvent - {", _Logistics.ReportFullPath, "} ", i, " of ", extractResults.Item3.Length)); _Log.Debug(string.Concat("TriggerEvent - {", _Logistics.ReportFullPath, "} ", i, " of ", extractResults.Item3.Length));
foreach (JsonProperty jsonProperty in extractResults.Item3[i].EnumerateObject()) foreach (JsonProperty jsonProperty in extractResults.Item3[i].EnumerateObject())
{ {
if (jsonProperty.Value.ValueKind != JsonValueKind.String || !keyValuePairs.ContainsKey(jsonProperty.Name)) if (jsonProperty.Value.ValueKind != JsonValueKind.String || !keyValuePairs.TryGetValue(jsonProperty.Name, out segments))
description = string.Empty; description = string.Empty;
else else
description = keyValuePairs[jsonProperty.Name].Split('|')[0]; description = segments.Split('|')[0];
if (!_UseCyclicalForDescription || headerNames.Contains(jsonProperty.Name)) if (!_UseCyclicalForDescription || headerNames.Contains(jsonProperty.Name))
value = jsonProperty.Value.ToString(); value = jsonProperty.Value.ToString();
else else
@ -484,10 +505,10 @@ public class FileRead : Properties.IFileRead
matches = Directory.GetFiles(_FileConnectorConfiguration.SourceFileLocation, segments.Last(), SearchOption.AllDirectories); matches = Directory.GetFiles(_FileConnectorConfiguration.SourceFileLocation, segments.Last(), SearchOption.AllDirectories);
else else
matches = Directory.GetFiles(_FileConnectorConfiguration.SourceFileLocation, segments.Last(), SearchOption.TopDirectoryOnly); matches = Directory.GetFiles(_FileConnectorConfiguration.SourceFileLocation, segments.Last(), SearchOption.TopDirectoryOnly);
if (matches.Any()) if (matches.Length != 0)
break; break;
} }
if (matches is null || !matches.Any()) if (matches is null || matches.Length == 0)
results = null; results = null;
else else
{ {
@ -550,16 +571,99 @@ public class FileRead : Properties.IFileRead
} }
} }
internal static List<string> GetDirectoryNames(string directory)
{
#nullable enable
List<string> results = new();
string? fileName;
string? checkDirectory = directory;
string? pathRoot = Path.GetPathRoot(directory);
string extension = Path.GetExtension(directory);
if (string.IsNullOrEmpty(pathRoot))
throw new NullReferenceException(nameof(pathRoot));
if (Directory.Exists(directory))
{
fileName = Path.GetFileName(directory);
if (!string.IsNullOrEmpty(fileName))
results.Add(fileName);
}
else if ((string.IsNullOrEmpty(extension) || extension.Length > 3) && !File.Exists(directory))
{
fileName = Path.GetFileName(directory);
if (!string.IsNullOrEmpty(fileName))
results.Add(fileName);
}
for (int i = 0; i < int.MaxValue; i++)
{
checkDirectory = Path.GetDirectoryName(checkDirectory);
if (string.IsNullOrEmpty(checkDirectory) || checkDirectory == pathRoot)
break;
fileName = Path.GetFileName(checkDirectory);
if (string.IsNullOrEmpty(fileName))
continue;
results.Add(fileName);
}
results.Add(pathRoot);
results.Reverse();
return results;
#nullable disable
}
private string GetJobIdDirectory(string path)
{
string result;
List<string> directoryNames = GetDirectoryNames(path);
if (!directoryNames.Contains(_Logistics.JobID))
result = Path.GetDirectoryName(path);
else
{
result = string.Empty;
foreach (string directoryName in directoryNames)
{
result = Path.Combine(result, directoryName);
if (directoryName == _Logistics.JobID)
break;
}
}
return result;
}
private static void DeleteEmptyTopDirectories(string rootDirectory)
{
if (Directory.Exists(rootDirectory))
{
string[] files;
string[] directories;
string[] subDirectories = Directory.GetDirectories(rootDirectory, "*", SearchOption.TopDirectoryOnly);
foreach (string subDirectory in subDirectories)
{
files = Directory.GetFiles(subDirectory, "*", SearchOption.AllDirectories);
if (files.Length > 0)
continue;
directories = Directory.GetDirectories(subDirectory, "*", SearchOption.TopDirectoryOnly);
if (directories.Length > 0)
continue;
try
{ Directory.Delete(subDirectory); }
catch (UnauthorizedAccessException)
{
new DirectoryInfo(subDirectory).Attributes = FileAttributes.Normal;
Directory.Delete(subDirectory);
}
}
}
}
private void Shared1811(string to, FileInfo sourceFile) private void Shared1811(string to, FileInfo sourceFile)
{ {
if (!_IsDuplicator && _FileConnectorConfiguration.SourceFileFilter != "*" && sourceFile.Exists && sourceFile.Length < _MinFileLength) if (!_IsDuplicator && _FileConnectorConfiguration.SourceFileFilter != "*" && sourceFile.Exists && sourceFile.Length < _MinFileLength)
{ {
string directoryName = Path.GetFileName(to); string directoryName = Path.GetFileName(to);
string jobIdDirectory = Path.GetDirectoryName(to); string jobIdDirectory = GetJobIdDirectory(to);
DateTime dateTime = DateTime.Now.AddMinutes(-15); DateTime dateTime = DateTime.Now.AddMinutes(-15);
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00"); string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}"; string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
string destinationDirectory = string.Concat(jobIdDirectory, @"\_ Ignore 100 bytes\", weekDirectory, @"\", directoryName); string destinationDirectory = Path.Combine(jobIdDirectory, "_ Ignore 100 bytes", weekDirectory, directoryName);
if (!Directory.Exists(destinationDirectory)) if (!Directory.Exists(destinationDirectory))
_ = Directory.CreateDirectory(destinationDirectory); _ = Directory.CreateDirectory(destinationDirectory);
File.Move(sourceFile.FullName, string.Concat(destinationDirectory, @"\", sourceFile.Name)); File.Move(sourceFile.FullName, string.Concat(destinationDirectory, @"\", sourceFile.Name));
@ -570,13 +674,13 @@ public class FileRead : Properties.IFileRead
{ {
if (!checkDirectory.Contains('_')) if (!checkDirectory.Contains('_'))
continue; continue;
if (Directory.GetDirectories(checkDirectory, "*", SearchOption.TopDirectoryOnly).Any()) if (Directory.GetDirectories(checkDirectory, "*", SearchOption.TopDirectoryOnly).Length != 0)
continue; continue;
if (Directory.GetFiles(checkDirectory, "*", SearchOption.TopDirectoryOnly).Any()) if (Directory.GetFiles(checkDirectory, "*", SearchOption.TopDirectoryOnly).Length != 0)
continue; continue;
if (Directory.GetDirectories(checkDirectory, "*", SearchOption.AllDirectories).Any()) if (Directory.GetDirectories(checkDirectory, "*", SearchOption.AllDirectories).Length != 0)
continue; continue;
if (Directory.GetFiles(checkDirectory, "*", SearchOption.AllDirectories).Any()) if (Directory.GetFiles(checkDirectory, "*", SearchOption.AllDirectories).Length != 0)
continue; continue;
if (new DirectoryInfo(checkDirectory).CreationTime > dateTime) if (new DirectoryInfo(checkDirectory).CreationTime > dateTime)
continue; continue;
@ -584,6 +688,7 @@ public class FileRead : Properties.IFileRead
} }
} }
catch (Exception) { throw; } catch (Exception) { throw; }
DeleteEmptyTopDirectories(jobIdDirectory);
} }
} }
@ -593,16 +698,16 @@ public class FileRead : Properties.IFileRead
{ {
foreach (string directory in (from l in directories orderby l.Split('\\').Length descending select l).Distinct()) foreach (string directory in (from l in directories orderby l.Split('\\').Length descending select l).Distinct())
{ {
if (Directory.Exists(directory) && !Directory.GetFiles(directory).Any()) if (Directory.Exists(directory) && Directory.GetFiles(directory).Length == 0)
Directory.Delete(directory); Directory.Delete(directory);
} }
} }
} }
protected void WaitForFileConsumption(DateTime dateTime, bool isDummyRun, string successDirectory, string duplicateDirectory, List<(Properties.IScopeInfo, string)> tuples, string duplicateFile) protected void WaitForFileConsumption<T>(DateTime dateTime, List<T> descriptions, bool isDummyRun, string successDirectory, string duplicateDirectory, List<(Properties.IScopeInfo, string)> collection, string duplicateFile) where T : Properties.IDescription
{ {
if (!isDummyRun && _IsEAFHosted) if (!isDummyRun && _IsEAFHosted)
WaitForFileConsumption(_FileConnectorConfiguration.SourceDirectoryCloaking, _Logistics, dateTime, successDirectory, duplicateDirectory, duplicateFile, tuples); WaitForFileConsumption(_FileConnectorConfiguration.SourceDirectoryCloaking, _Logistics, dateTime, descriptions, successDirectory, duplicateDirectory, duplicateFile, collection);
else else
{ {
long breakAfter = DateTime.Now.AddSeconds(_FileConnectorConfiguration.ConnectionRetryInterval.Value).Ticks; long breakAfter = DateTime.Now.AddSeconds(_FileConnectorConfiguration.ConnectionRetryInterval.Value).Ticks;

View File

@ -51,7 +51,7 @@ public class Logistics : ILogistics
_Logistics2 = new List<Logistics2>(); _Logistics2 = new List<Logistics2>();
} }
public Logistics(IFileRead fileRead, string reportFullPath, bool useSplitForMID, int? fileInfoLength = null) public Logistics(IFileRead fileRead, long tickOffset, string reportFullPath, bool useSplitForMID, int? fileInfoLength = null)
{ {
if (string.IsNullOrEmpty(fileRead.CellInstanceName)) if (string.IsNullOrEmpty(fileRead.CellInstanceName))
throw new Exception(); throw new Exception();
@ -59,7 +59,7 @@ public class Logistics : ILogistics
throw new Exception(); throw new Exception();
_NullData = fileRead.NullData; _NullData = fileRead.NullData;
_FileInfo = new(reportFullPath); _FileInfo = new(reportFullPath);
DateTime dateTime = _FileInfo.LastWriteTime; DateTime dateTime = new(_FileInfo.LastWriteTime.Ticks + tickOffset);
if (fileInfoLength.HasValue && _FileInfo.Length < fileInfoLength.Value) if (fileInfoLength.HasValue && _FileInfo.Length < fileInfoLength.Value)
dateTime = dateTime.AddTicks(-1); dateTime = dateTime.AddTicks(-1);
_JobID = fileRead.CellInstanceName; _JobID = fileRead.CellInstanceName;
@ -91,7 +91,7 @@ public class Logistics : ILogistics
string[] segments; string[] segments;
_FileInfo = new(reportFullPath); _FileInfo = new(reportFullPath);
_Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList(); _Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList();
if (!Logistics1.Any() || !Logistics1[0].StartsWith("LOGISTICS_1")) if (Logistics1.Count == 0 || !Logistics1[0].StartsWith("LOGISTICS_1"))
{ {
_NullData = null; _NullData = null;
_JobID = "null"; _JobID = "null";

View File

@ -16,7 +16,7 @@ public class ScopeInfo : Properties.IScopeInfo
public string QueryFilter { get; private set; } public string QueryFilter { get; private set; }
public string FileNameWithoutExtension { get; private set; } public string FileNameWithoutExtension { get; private set; }
public ScopeInfo(Test test, string fileName, string queryFilter = "", string title = "", string html = "") public ScopeInfo(Test test, string fileName, string queryFilter = "", string title = "", string html = "", string extraExtension = "")
{ {
Enum = test; Enum = test;
Test = test; Test = test;

View File

@ -2,18 +2,27 @@
public partial class WS public partial class WS
{ {
public class Attachment public class Attachment
{ {
public string SubGroupId { get; set; }
public long HeaderId { get; set; }
public string HeaderIdDirectory { get; set; }
public string UniqueId { get; set; } public string UniqueId { get; set; }
public string DestinationFileName { get; set; } public string DestinationFileName { get; set; }
public string SourceFileName { get; set; } public string SourceFileName { get; set; }
public string AttachmentId { get; set; }
public Attachment(string uniqueId, string destinationFileName, string sourceFileName) public Attachment(string subGroupId, long headerId, string headerIdDirectory, string uniqueId, string destinationFileName, string sourceFileName)
{ {
SubGroupId = subGroupId;
HeaderId = headerId;
HeaderIdDirectory = headerIdDirectory;
UniqueId = uniqueId; UniqueId = uniqueId;
DestinationFileName = destinationFileName; DestinationFileName = destinationFileName;
SourceFileName = sourceFileName; SourceFileName = sourceFileName;
AttachmentId = System.Guid.NewGuid().ToString();
} }
} }

View File

@ -10,7 +10,7 @@ namespace Adaptation.Shared.Metrology;
public partial class WS public partial class WS
{ {
public static (string, Results) SendData(string url, object payload, int timeoutSeconds = 120) public static (string, Results) SendData(string url, long sequence, string directory, object payload, int timeoutSeconds = 120)
{ {
Results results = new(); Results results = new();
string resultsJson = string.Empty; string resultsJson = string.Empty;
@ -30,7 +30,11 @@ public partial class WS
}; };
HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result; HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result;
resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result; resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result;
results = JsonSerializer.Deserialize<Results>(resultsJson); results = JsonSerializer.Deserialize<Results>(resultsJson, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
string checkDirectory = Path.Combine(directory, $"-{results.HeaderID}");
if (!Directory.Exists(checkDirectory))
_ = Directory.CreateDirectory(checkDirectory);
File.WriteAllText(Path.Combine(checkDirectory, $"{sequence}.json"), json);
} }
if (!results.Success) if (!results.Success)
results.Errors.Add(results.ToString()); results.Errors.Add(results.ToString());
@ -44,65 +48,49 @@ public partial class WS
_ = stringBuilder.AppendLine(exception.Message); _ = stringBuilder.AppendLine(exception.Message);
exception = exception.InnerException; exception = exception.InnerException;
} }
if (results.Errors is null) results.Errors ??= new List<string>();
results.Errors = new List<string>(); results.Errors.Add(resultsJson);
results.Errors.Add(stringBuilder.ToString()); results.Errors.Add(stringBuilder.ToString());
} }
return new(resultsJson, results); return new(resultsJson, results);
} }
// this method is a wrapper for attaching a file to either a header or data record public static void AttachFile(string url, Attachment attachment, int timeoutSeconds = 60)
// URL is the same URL used for SendData, ex: http://localhost/api/inbound/CDE
// attachToHeaderId is the ID returned by SendData
// attachToDataUniqueId is the string unique ID for the data record, aka the Title of the Sharepoint list entry
// fileContents is a byte array with the contents of the file
// fileName is which attachment this is, image.pdf, data.pdf, data.txt, header.pdf, etc
// timeoutSeconds is configured as the request timeout
// this method will either succeed or throw an exception
// also, this has been made synchronous
public static void AttachFile(string url, long attachToHeaderId, string attachToDataUniqueId, byte[] fileContents, string fileName, int timeoutSeconds = 60)
{ {
using HttpClient httpClient = new(); using HttpClient httpClient = new();
string requestUrl = url + "/attachment?headerid=" + attachToHeaderId.ToString(); string json = JsonSerializer.Serialize(attachment);
if (!string.IsNullOrWhiteSpace(attachToDataUniqueId))
{
requestUrl += "&datauniqueid=";
requestUrl += System.Net.WebUtility.UrlEncode(attachToDataUniqueId);
}
requestUrl += "&filename="; // this is just so the web server log shows the filename
requestUrl += System.Net.WebUtility.UrlEncode(fileName);
httpClient.Timeout = new TimeSpan(0, 0, 0, timeoutSeconds, 0); httpClient.Timeout = new TimeSpan(0, 0, 0, timeoutSeconds, 0);
StringContent httpContent = new(json, Encoding.UTF8, "application/json");
MultipartFormDataContent multipartFormDataContent = new(); HttpResponseMessage httpResponseMessage = httpClient.PostAsync($"{url}/attachment", httpContent).Result;
ByteArrayContent byteArrayContent = new(fileContents); if (!httpResponseMessage.IsSuccessStatusCode)
byteArrayContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/octet-stream"); {
multipartFormDataContent.Add(byteArrayContent, "attachment", fileName);
HttpResponseMessage httpResponseMessage = httpClient.PostAsync(requestUrl, multipartFormDataContent).Result;
if (httpResponseMessage.IsSuccessStatusCode)
return;
string resultBody = httpResponseMessage.Content.ReadAsStringAsync().Result; string resultBody = httpResponseMessage.Content.ReadAsStringAsync().Result;
throw new Exception($"Attachment failed: {resultBody}");
throw new Exception("Attachment failed: " + resultBody); }
} }
public static void AttachFiles(string url, long headerID, List<Attachment> headerAttachments = null, List<Attachment> dataAttachments = null) public static void AttachFiles(string url, List<Attachment> headerAttachments = null, List<Attachment> dataAttachments = null)
{ {
string directory;
try try
{ {
if (headerAttachments is not null) if (headerAttachments is not null)
{ {
foreach (Attachment attachment in headerAttachments) foreach (Attachment attachment in headerAttachments)
AttachFile(url, headerID, "", File.ReadAllBytes(attachment.SourceFileName), attachment.DestinationFileName); {
directory = Path.GetDirectoryName(attachment.HeaderIdDirectory) ?? throw new Exception();
File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.AttachmentId, attachment.DestinationFileName), overwrite: true);
AttachFile(url, attachment);
}
} }
if (dataAttachments is not null) if (dataAttachments is not null)
{ {
foreach (Attachment attachment in dataAttachments) foreach (Attachment attachment in dataAttachments)
AttachFile(url, headerID, attachment.UniqueId, File.ReadAllBytes(attachment.SourceFileName), attachment.DestinationFileName); {
directory = Path.GetDirectoryName(attachment.HeaderIdDirectory) ?? throw new Exception();
File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.AttachmentId, attachment.DestinationFileName), overwrite: true);
AttachFile(url, attachment);
}
} }
//MessageBox.Show(r.ToString()); //MessageBox.Show(r.ToString());
} }

View File

@ -23,7 +23,7 @@ public class ProcessDataStandardFormat
public static string GetPDSFText(IFileRead fileRead, Logistics logistics, JsonElement[] jsonElements, string logisticsText) public static string GetPDSFText(IFileRead fileRead, Logistics logistics, JsonElement[] jsonElements, string logisticsText)
{ {
string result; string result;
if (!jsonElements.Any()) if (jsonElements.Length == 0)
result = string.Empty; result = string.Empty;
else else
{ {
@ -91,8 +91,7 @@ public class ProcessDataStandardFormat
string segment; string segment;
List<string> body = new(); List<string> body = new();
StringBuilder logistics = new(); StringBuilder logistics = new();
if (lines is null) lines ??= File.ReadAllLines(reportFullPath);
lines = File.ReadAllLines(reportFullPath);
string[] segments; string[] segments;
if (lines.Length < 7) if (lines.Length < 7)
segments = Array.Empty<string>(); segments = Array.Empty<string>();
@ -147,7 +146,7 @@ public class ProcessDataStandardFormat
string logistics = pdsf.Item1; string logistics = pdsf.Item1;
string[] columns = pdsf.Item2; string[] columns = pdsf.Item2;
string[] bodyLines = pdsf.Item3; string[] bodyLines = pdsf.Item3;
if (!bodyLines.Any() || !bodyLines[0].Contains('\t')) if (bodyLines.Length == 0 || !bodyLines[0].Contains('\t'))
results = JsonSerializer.Deserialize<JsonElement[]>("[]"); results = JsonSerializer.Deserialize<JsonElement[]>("[]");
else else
{ {
@ -212,9 +211,10 @@ public class ProcessDataStandardFormat
public static Tuple<string, Dictionary<Test, Dictionary<string, List<string>>>> GetTestDictionary(Tuple<string, string[], string[]> pdsf) public static Tuple<string, Dictionary<Test, Dictionary<string, List<string>>>> GetTestDictionary(Tuple<string, string[], string[]> pdsf)
{ {
Dictionary<Test, Dictionary<string, List<string>>> results = new(); Dictionary<Test, Dictionary<string, List<string>>> results = new();
List<string> collection;
string testColumn = nameof(Test); string testColumn = nameof(Test);
Dictionary<string, List<string>> keyValuePairs = GetDictionary(pdsf); Dictionary<string, List<string>> keyValuePairs = GetDictionary(pdsf);
if (!keyValuePairs.ContainsKey(testColumn)) if (!keyValuePairs.TryGetValue(testColumn, out collection))
throw new Exception(); throw new Exception();
int min; int min;
int max; int max;
@ -222,9 +222,9 @@ public class ProcessDataStandardFormat
List<string> vs; List<string> vs;
string columnKey; string columnKey;
Dictionary<Test, List<int>> tests = new(); Dictionary<Test, List<int>> tests = new();
for (int i = 0; i < keyValuePairs[testColumn].Count; i++) for (int i = 0; i < collection.Count; i++)
{ {
if (Enum.TryParse(keyValuePairs[testColumn][i], out Test test)) if (Enum.TryParse(collection[i], out Test test))
{ {
if (!results.ContainsKey(test)) if (!results.ContainsKey(test))
{ {
@ -276,8 +276,7 @@ public class ProcessDataStandardFormat
public static string GetLines(Logistics logistics, Properties.IScopeInfo scopeInfo, List<string> names, Dictionary<string, List<string>> keyValuePairs, string dateFormat, string timeFormat, List<string> pairedParameterNames, bool useDateTimeFromSequence = true, string format = "", List<string> ignoreParameterNames = null) public static string GetLines(Logistics logistics, Properties.IScopeInfo scopeInfo, List<string> names, Dictionary<string, List<string>> keyValuePairs, string dateFormat, string timeFormat, List<string> pairedParameterNames, bool useDateTimeFromSequence = true, string format = "", List<string> ignoreParameterNames = null)
{ {
StringBuilder result = new(); StringBuilder result = new();
if (ignoreParameterNames is null) ignoreParameterNames ??= new List<string>();
ignoreParameterNames = new List<string>();
if (useDateTimeFromSequence && !string.IsNullOrEmpty(format)) if (useDateTimeFromSequence && !string.IsNullOrEmpty(format))
throw new Exception(); throw new Exception();
else if (!useDateTimeFromSequence && string.IsNullOrEmpty(format)) else if (!useDateTimeFromSequence && string.IsNullOrEmpty(format))
@ -327,7 +326,7 @@ public class ProcessDataStandardFormat
_ = line.Append(';'); _ = line.Append(';');
} }
} }
if (!pairedParameterNames.Any()) if (pairedParameterNames.Count == 0)
{ {
_ = line.Remove(line.Length - 1, 1); _ = line.Remove(line.Length - 1, 1);
_ = result.AppendLine(line.ToString()); _ = result.AppendLine(line.ToString());
@ -357,8 +356,7 @@ public class ProcessDataStandardFormat
if (string.IsNullOrEmpty(lines[i])) if (string.IsNullOrEmpty(lines[i]))
continue; continue;
segments = lines[i].Split(inputSeparator); segments = lines[i].Split(inputSeparator);
if (currentGroup is null) currentGroup ??= segments.Length;
currentGroup = segments.Length;
if (segments.Length != currentGroup) if (segments.Length != currentGroup)
{ {
currentGroup = segments.Length; currentGroup = segments.Length;

View File

@ -6,5 +6,6 @@ public interface IDescription
int Test { get; } int Test { get; }
int Count { get; } int Count { get; }
int Index { get; } int Index { get; }
string RDS { get; }
} }

View File

@ -14,6 +14,7 @@ public enum Test
CandelaPSL = 38, CandelaPSL = 38,
CandelaVerify = 37, CandelaVerify = 37,
CDE = 24, CDE = 24,
Climatec = 54, //Largest
CV = 3, CV = 3,
DailyRPMAverage = 19, DailyRPMAverage = 19,
DailyRPMPLRatio = 20, DailyRPMPLRatio = 20,
@ -21,7 +22,7 @@ public enum Test
Denton = 9, Denton = 9,
DiffusionLength = 45, DiffusionLength = 45,
GRATXTCenter = 51, GRATXTCenter = 51,
GRATXTEdge = 52, //Largest GRATXTEdge = 52,
GrowthRateXML = 50, GrowthRateXML = 50,
Hall = 10, Hall = 10,
HgCV = 23, HgCV = 23,
@ -38,6 +39,7 @@ public enum Test
RPMPLRatio = 17, RPMPLRatio = 17,
RPMXY = 15, RPMXY = 15,
SP1 = 8, SP1 = 8,
SRP2100 = 53,
Tencor = 7, Tencor = 7,
UV = 35, UV = 35,
VerificationLehighton = 14, VerificationLehighton = 14,

View File

@ -1,3 +1,4 @@
#if v2_39_2
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -31,8 +32,7 @@ public class DEP08SIASM : EAFLoggingUnitTesting
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
if (EAFLoggingUnitTesting is null) EAFLoggingUnitTesting ??= new DEP08SIASM(testContext);
EAFLoggingUnitTesting = new DEP08SIASM(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
@ -42,13 +42,11 @@ public class DEP08SIASM : EAFLoggingUnitTesting
[ClassCleanup()] [ClassCleanup()]
public static void ClassCleanup() public static void ClassCleanup()
{ {
if (EAFLoggingUnitTesting.Logger is not null) EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose();
if (EAFLoggingUnitTesting is not null)
EAFLoggingUnitTesting.Dispose();
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -61,7 +59,7 @@ public class DEP08SIASM : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -74,7 +72,7 @@ public class DEP08SIASM : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -87,7 +85,7 @@ public class DEP08SIASM : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -100,7 +98,7 @@ public class DEP08SIASM : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -113,7 +111,7 @@ public class DEP08SIASM : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -126,7 +124,7 @@ public class DEP08SIASM : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -139,7 +137,7 @@ public class DEP08SIASM : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -152,7 +150,7 @@ public class DEP08SIASM : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -166,3 +164,4 @@ public class DEP08SIASM : EAFLoggingUnitTesting
} }
} }
#endif

View File

@ -1,3 +1,4 @@
#if v2_39_2
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -31,8 +32,7 @@ public class R34_EQPT : EAFLoggingUnitTesting
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
if (EAFLoggingUnitTesting is null) EAFLoggingUnitTesting ??= new R34_EQPT(testContext);
EAFLoggingUnitTesting = new R34_EQPT(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
@ -42,13 +42,11 @@ public class R34_EQPT : EAFLoggingUnitTesting
[ClassCleanup()] [ClassCleanup()]
public static void ClassCleanup() public static void ClassCleanup()
{ {
if (EAFLoggingUnitTesting.Logger is not null) EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose();
if (EAFLoggingUnitTesting is not null)
EAFLoggingUnitTesting.Dispose();
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -62,3 +60,4 @@ public class R34_EQPT : EAFLoggingUnitTesting
} }
} }
#endif

View File

@ -1,3 +1,4 @@
#if v2_39_2
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -31,8 +32,7 @@ public class R34 : EAFLoggingUnitTesting
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
if (EAFLoggingUnitTesting is null) EAFLoggingUnitTesting ??= new R34(testContext);
EAFLoggingUnitTesting = new R34(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
@ -42,13 +42,11 @@ public class R34 : EAFLoggingUnitTesting
[ClassCleanup()] [ClassCleanup()]
public static void ClassCleanup() public static void ClassCleanup()
{ {
if (EAFLoggingUnitTesting.Logger is not null) EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose();
if (EAFLoggingUnitTesting is not null)
EAFLoggingUnitTesting.Dispose();
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -62,3 +60,4 @@ public class R34 : EAFLoggingUnitTesting
} }
} }
#endif

View File

@ -1,3 +1,4 @@
#if v2_39_2
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -31,8 +32,7 @@ public class R36_EQPT : EAFLoggingUnitTesting
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
if (EAFLoggingUnitTesting is null) EAFLoggingUnitTesting ??= new R36_EQPT(testContext);
EAFLoggingUnitTesting = new R36_EQPT(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
@ -42,13 +42,11 @@ public class R36_EQPT : EAFLoggingUnitTesting
[ClassCleanup()] [ClassCleanup()]
public static void ClassCleanup() public static void ClassCleanup()
{ {
if (EAFLoggingUnitTesting.Logger is not null) EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose();
if (EAFLoggingUnitTesting is not null)
EAFLoggingUnitTesting.Dispose();
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -62,3 +60,4 @@ public class R36_EQPT : EAFLoggingUnitTesting
} }
} }
#endif

View File

@ -1,3 +1,4 @@
#if v2_39_2
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -31,8 +32,7 @@ public class R36 : EAFLoggingUnitTesting
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
if (EAFLoggingUnitTesting is null) EAFLoggingUnitTesting ??= new R36(testContext);
EAFLoggingUnitTesting = new R36(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
@ -42,13 +42,11 @@ public class R36 : EAFLoggingUnitTesting
[ClassCleanup()] [ClassCleanup()]
public static void ClassCleanup() public static void ClassCleanup()
{ {
if (EAFLoggingUnitTesting.Logger is not null) EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose();
if (EAFLoggingUnitTesting is not null)
EAFLoggingUnitTesting.Dispose();
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -62,3 +60,4 @@ public class R36 : EAFLoggingUnitTesting
} }
} }
#endif

View File

@ -1,3 +1,4 @@
#if v2_43_0
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -6,7 +7,7 @@ using System.Diagnostics;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0; namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4;
[TestClass] [TestClass]
public class DEP08SIASM : EAFLoggingUnitTesting public class DEP08SIASM : EAFLoggingUnitTesting
@ -31,8 +32,7 @@ public class DEP08SIASM : EAFLoggingUnitTesting
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
if (EAFLoggingUnitTesting is null) EAFLoggingUnitTesting ??= new DEP08SIASM(testContext);
EAFLoggingUnitTesting = new DEP08SIASM(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
@ -42,17 +42,15 @@ public class DEP08SIASM : EAFLoggingUnitTesting
[ClassCleanup()] [ClassCleanup()]
public static void ClassCleanup() public static void ClassCleanup()
{ {
if (EAFLoggingUnitTesting.Logger is not null) EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose();
if (EAFLoggingUnitTesting is not null)
EAFLoggingUnitTesting.Dispose();
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__MoveMatchingFiles() public void Staging__v2_43_4__DEP08SIASM__MoveMatchingFiles()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -61,11 +59,11 @@ public class DEP08SIASM : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__OpenInsightMetrologyViewer() public void Staging__v2_43_4__DEP08SIASM__OpenInsightMetrologyViewer()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -74,11 +72,11 @@ public class DEP08SIASM : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__IQSSi() public void Staging__v2_43_4__DEP08SIASM__IQSSi()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -87,11 +85,11 @@ public class DEP08SIASM : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__OpenInsight() public void Staging__v2_43_4__DEP08SIASM__OpenInsight()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -100,11 +98,11 @@ public class DEP08SIASM : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__OpenInsightMetrologyViewerAttachments() public void Staging__v2_43_4__DEP08SIASM__OpenInsightMetrologyViewerAttachments()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -113,11 +111,11 @@ public class DEP08SIASM : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__APC() public void Staging__v2_43_4__DEP08SIASM__APC()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -126,11 +124,11 @@ public class DEP08SIASM : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__SPaCe() public void Staging__v2_43_4__DEP08SIASM__SPaCe()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -139,11 +137,11 @@ public class DEP08SIASM : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__Processed() public void Staging__v2_43_4__DEP08SIASM__Processed()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -152,11 +150,11 @@ public class DEP08SIASM : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__Archive() public void Staging__v2_43_4__DEP08SIASM__Archive()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -165,11 +163,11 @@ public class DEP08SIASM : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__Dummy() public void Staging__v2_43_4__DEP08SIASM__Dummy()
{ {
string check = "637400762024374000.zip"; string check = "637400762024374000.zip";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -179,3 +177,4 @@ public class DEP08SIASM : EAFLoggingUnitTesting
} }
} }
#endif

View File

@ -1,3 +1,4 @@
#if v2_43_0
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -6,7 +7,7 @@ using System.Diagnostics;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0; namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4;
[TestClass] [TestClass]
public class R34_EQPT : EAFLoggingUnitTesting public class R34_EQPT : EAFLoggingUnitTesting
@ -31,8 +32,7 @@ public class R34_EQPT : EAFLoggingUnitTesting
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
if (EAFLoggingUnitTesting is null) EAFLoggingUnitTesting ??= new R34_EQPT(testContext);
EAFLoggingUnitTesting = new R34_EQPT(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
@ -42,17 +42,15 @@ public class R34_EQPT : EAFLoggingUnitTesting
[ClassCleanup()] [ClassCleanup()]
public static void ClassCleanup() public static void ClassCleanup()
{ {
if (EAFLoggingUnitTesting.Logger is not null) EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose();
if (EAFLoggingUnitTesting is not null)
EAFLoggingUnitTesting.Dispose();
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__R34_EQPT__DownloadJpegFile() public void Staging__v2_43_4__R34_EQPT__DownloadJpegFile()
{ {
string check = ".jpeg"; string check = ".jpeg";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -62,3 +60,4 @@ public class R34_EQPT : EAFLoggingUnitTesting
} }
} }
#endif

View File

@ -1,3 +1,4 @@
#if v2_43_0
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -6,7 +7,7 @@ using System.Diagnostics;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0; namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4;
[TestClass] [TestClass]
public class R34 : EAFLoggingUnitTesting public class R34 : EAFLoggingUnitTesting
@ -31,8 +32,7 @@ public class R34 : EAFLoggingUnitTesting
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
if (EAFLoggingUnitTesting is null) EAFLoggingUnitTesting ??= new R34(testContext);
EAFLoggingUnitTesting = new R34(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
@ -42,17 +42,15 @@ public class R34 : EAFLoggingUnitTesting
[ClassCleanup()] [ClassCleanup()]
public static void ClassCleanup() public static void ClassCleanup()
{ {
if (EAFLoggingUnitTesting.Logger is not null) EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose();
if (EAFLoggingUnitTesting is not null)
EAFLoggingUnitTesting.Dispose();
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__R34__jpeg() public void Staging__v2_43_4__R34__jpeg()
{ {
string check = "*.jpeg"; string check = "*.jpeg";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -62,3 +60,4 @@ public class R34 : EAFLoggingUnitTesting
} }
} }
#endif

View File

@ -1,3 +1,4 @@
#if v2_43_0
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -6,7 +7,7 @@ using System.Diagnostics;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0; namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4;
[TestClass] [TestClass]
public class R36_EQPT : EAFLoggingUnitTesting public class R36_EQPT : EAFLoggingUnitTesting
@ -31,8 +32,7 @@ public class R36_EQPT : EAFLoggingUnitTesting
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
if (EAFLoggingUnitTesting is null) EAFLoggingUnitTesting ??= new R36_EQPT(testContext);
EAFLoggingUnitTesting = new R36_EQPT(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
@ -42,17 +42,15 @@ public class R36_EQPT : EAFLoggingUnitTesting
[ClassCleanup()] [ClassCleanup()]
public static void ClassCleanup() public static void ClassCleanup()
{ {
if (EAFLoggingUnitTesting.Logger is not null) EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose();
if (EAFLoggingUnitTesting is not null)
EAFLoggingUnitTesting.Dispose();
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__R36_EQPT__DownloadJpegFile() public void Staging__v2_43_4__R36_EQPT__DownloadJpegFile()
{ {
string check = ".jpeg"; string check = ".jpeg";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -62,3 +60,4 @@ public class R36_EQPT : EAFLoggingUnitTesting
} }
} }
#endif

View File

@ -1,3 +1,4 @@
#if v2_43_0
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -6,7 +7,7 @@ using System.Diagnostics;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0; namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4;
[TestClass] [TestClass]
public class R36 : EAFLoggingUnitTesting public class R36 : EAFLoggingUnitTesting
@ -31,8 +32,7 @@ public class R36 : EAFLoggingUnitTesting
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
if (EAFLoggingUnitTesting is null) EAFLoggingUnitTesting ??= new R36(testContext);
EAFLoggingUnitTesting = new R36(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
@ -42,17 +42,15 @@ public class R36 : EAFLoggingUnitTesting
[ClassCleanup()] [ClassCleanup()]
public static void ClassCleanup() public static void ClassCleanup()
{ {
if (EAFLoggingUnitTesting.Logger is not null) EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose();
if (EAFLoggingUnitTesting is not null)
EAFLoggingUnitTesting.Dispose();
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__R36__jpeg() public void Staging__v2_43_4__R36__jpeg()
{ {
string check = "*.jpeg"; string check = "*.jpeg";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -62,3 +60,4 @@ public class R36 : EAFLoggingUnitTesting
} }
} }
#endif

View File

@ -0,0 +1,180 @@
#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.Staging.v2_56_0;
[TestClass]
public class DEP08SIASM : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static DEP08SIASM EAFLoggingUnitTesting { get; private set; }
public DEP08SIASM() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public DEP08SIASM(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new DEP08SIASM(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 Staging__v2_56_0__DEP08SIASM__MoveMatchingFiles()
{
string check = "*.pdsf";
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 Staging__v2_56_0__DEP08SIASM__OpenInsightMetrologyViewer()
{
string check = "*.pdsf";
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 Staging__v2_56_0__DEP08SIASM__IQSSi()
{
string check = "*.pdsf";
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 Staging__v2_56_0__DEP08SIASM__OpenInsight()
{
string check = "*.pdsf";
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 Staging__v2_56_0__DEP08SIASM__OpenInsightMetrologyViewerAttachments()
{
string check = "*.pdsf";
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 Staging__v2_56_0__DEP08SIASM__APC()
{
string check = "*.pdsf";
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 Staging__v2_56_0__DEP08SIASM__SPaCe()
{
string check = "*.pdsf";
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 Staging__v2_56_0__DEP08SIASM__Processed()
{
string check = "*.pdsf";
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 Staging__v2_56_0__DEP08SIASM__Archive()
{
string check = "*.pdsf";
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 Staging__v2_56_0__DEP08SIASM__Dummy()
{
string check = "637400762024374000.zip";
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

View File

@ -0,0 +1,63 @@
#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.Staging.v2_56_0;
[TestClass]
public class R34_EQPT : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static R34_EQPT EAFLoggingUnitTesting { get; private set; }
public R34_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public R34_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new R34_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 Staging__v2_56_0__R34_EQPT__DownloadJpegFile()
{
string check = ".jpeg";
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

View File

@ -0,0 +1,63 @@
#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.Staging.v2_56_0;
[TestClass]
public class R34 : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static R34 EAFLoggingUnitTesting { get; private set; }
public R34() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public R34(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new R34(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 Staging__v2_56_0__R34__jpeg()
{
string check = "*.jpeg";
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

View File

@ -0,0 +1,63 @@
#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.Staging.v2_56_0;
[TestClass]
public class R36_EQPT : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static R36_EQPT EAFLoggingUnitTesting { get; private set; }
public R36_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public R36_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new R36_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 Staging__v2_56_0__R36_EQPT__DownloadJpegFile()
{
string check = ".jpeg";
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

View File

@ -0,0 +1,63 @@
#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.Staging.v2_56_0;
[TestClass]
public class R36 : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static R36 EAFLoggingUnitTesting { get; private set; }
public R36() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public R36(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new R36(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 Staging__v2_56_0__R36__jpeg()
{
string check = "*.jpeg";
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

View File

@ -1,3 +1,4 @@
#if v2_39_2
using Adaptation.Shared; using Adaptation.Shared;
using Adaptation.Shared.Methods; using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -22,25 +23,25 @@ public class DEP08SIASM
_DEP08SIASM = CreateSelfDescription.Staging.v2_39_2.DEP08SIASM.EAFLoggingUnitTesting; _DEP08SIASM = CreateSelfDescription.Staging.v2_39_2.DEP08SIASM.EAFLoggingUnitTesting;
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM(); public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM_() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM_(); public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM_() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM_();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM__() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM__(); public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM__() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM__();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -55,34 +56,35 @@ public class DEP08SIASM
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM___() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM___(); public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM___() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM___();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM____() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM____(); public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM____() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM____();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM_____() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM_____(); public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM_____() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM_____();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM______() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM______(); public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM______() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM______();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM_______() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM_______(); public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM_______() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM_______();
} }
#endif

View File

@ -1,3 +1,4 @@
#if v2_39_2
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Staging.v2_39_2; namespace Adaptation._Tests.Extract.Staging.v2_39_2;
@ -18,16 +19,17 @@ public class R34_EQPT
_R34_EQPT = CreateSelfDescription.Staging.v2_39_2.R34_EQPT.EAFLoggingUnitTesting; _R34_EQPT = CreateSelfDescription.Staging.v2_39_2.R34_EQPT.EAFLoggingUnitTesting;
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_39_2__R34_EQPT__DownloadJpegFile() => _R34_EQPT.Staging__v2_39_2__R34_EQPT__DownloadJpegFile(); public void Staging__v2_39_2__R34_EQPT__DownloadJpegFile() => _R34_EQPT.Staging__v2_39_2__R34_EQPT__DownloadJpegFile();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_39_2__R34_EQPT__DownloadJpegFile637812143477007703__Normal() => _R34_EQPT.Staging__v2_39_2__R34_EQPT__DownloadJpegFile(); public void Staging__v2_39_2__R34_EQPT__DownloadJpegFile637812143477007703__Normal() => _R34_EQPT.Staging__v2_39_2__R34_EQPT__DownloadJpegFile();
} }
#endif

View File

@ -1,3 +1,4 @@
#if v2_39_2
using Adaptation.Shared; using Adaptation.Shared;
using Adaptation.Shared.Methods; using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -22,13 +23,13 @@ public class R34
_R34 = CreateSelfDescription.Staging.v2_39_2.R34.EAFLoggingUnitTesting; _R34 = CreateSelfDescription.Staging.v2_39_2.R34.EAFLoggingUnitTesting;
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_39_2__R34__jpeg() => _R34.Staging__v2_39_2__R34__jpeg(); public void Staging__v2_39_2__R34__jpeg() => _R34.Staging__v2_39_2__R34__jpeg();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -44,3 +45,4 @@ public class R34
} }
} }
#endif

View File

@ -1,3 +1,4 @@
#if v2_39_2
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Staging.v2_39_2; namespace Adaptation._Tests.Extract.Staging.v2_39_2;
@ -18,10 +19,11 @@ public class R36_EQPT
_R36_EQPT = CreateSelfDescription.Staging.v2_39_2.R36_EQPT.EAFLoggingUnitTesting; _R36_EQPT = CreateSelfDescription.Staging.v2_39_2.R36_EQPT.EAFLoggingUnitTesting;
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_39_2__R36_EQPT__DownloadJpegFile() => _R36_EQPT.Staging__v2_39_2__R36_EQPT__DownloadJpegFile(); public void Staging__v2_39_2__R36_EQPT__DownloadJpegFile() => _R36_EQPT.Staging__v2_39_2__R36_EQPT__DownloadJpegFile();
} }
#endif

View File

@ -1,3 +1,4 @@
#if v2_39_2
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Staging.v2_39_2; namespace Adaptation._Tests.Extract.Staging.v2_39_2;
@ -18,10 +19,11 @@ public class R36
_R36 = CreateSelfDescription.Staging.v2_39_2.R36.EAFLoggingUnitTesting; _R36 = CreateSelfDescription.Staging.v2_39_2.R36.EAFLoggingUnitTesting;
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_39_2__R36__jpeg() => _R36.Staging__v2_39_2__R36__jpeg(); public void Staging__v2_39_2__R36__jpeg() => _R36.Staging__v2_39_2__R36__jpeg();
} }
#endif

View File

@ -1,6 +1,7 @@
#if v2_43_0
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Staging.v2_43_0; namespace Adaptation._Tests.Extract.Staging.v2_43_4;
[TestClass] [TestClass]
public class DEP08SIASM public class DEP08SIASM
@ -9,73 +10,74 @@ public class DEP08SIASM
#pragma warning disable CA2254 #pragma warning disable CA2254
#pragma warning disable IDE0060 #pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_43_0.DEP08SIASM _DEP08SIASM; private static CreateSelfDescription.Staging.v2_43_4.DEP08SIASM _DEP08SIASM;
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
CreateSelfDescription.Staging.v2_43_0.DEP08SIASM.ClassInitialize(testContext); CreateSelfDescription.Staging.v2_43_4.DEP08SIASM.ClassInitialize(testContext);
_DEP08SIASM = CreateSelfDescription.Staging.v2_43_0.DEP08SIASM.EAFLoggingUnitTesting; _DEP08SIASM = CreateSelfDescription.Staging.v2_43_4.DEP08SIASM.EAFLoggingUnitTesting;
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__MoveMatchingFiles() => _DEP08SIASM.Staging__v2_43_0__DEP08SIASM__MoveMatchingFiles(); public void Staging__v2_43_4__DEP08SIASM__MoveMatchingFiles() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__MoveMatchingFiles();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__OpenInsightMetrologyViewer() => _DEP08SIASM.Staging__v2_43_0__DEP08SIASM__OpenInsightMetrologyViewer(); public void Staging__v2_43_4__DEP08SIASM__OpenInsightMetrologyViewer() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__OpenInsightMetrologyViewer();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__IQSSi() => _DEP08SIASM.Staging__v2_43_0__DEP08SIASM__IQSSi(); public void Staging__v2_43_4__DEP08SIASM__IQSSi() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__IQSSi();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__OpenInsight() => _DEP08SIASM.Staging__v2_43_0__DEP08SIASM__OpenInsight(); public void Staging__v2_43_4__DEP08SIASM__OpenInsight() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__OpenInsight();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__OpenInsightMetrologyViewerAttachments() => _DEP08SIASM.Staging__v2_43_0__DEP08SIASM__OpenInsightMetrologyViewerAttachments(); public void Staging__v2_43_4__DEP08SIASM__OpenInsightMetrologyViewerAttachments() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__OpenInsightMetrologyViewerAttachments();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__APC() => _DEP08SIASM.Staging__v2_43_0__DEP08SIASM__APC(); public void Staging__v2_43_4__DEP08SIASM__APC() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__APC();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__SPaCe() => _DEP08SIASM.Staging__v2_43_0__DEP08SIASM__SPaCe(); public void Staging__v2_43_4__DEP08SIASM__SPaCe() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__SPaCe();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__Processed() => _DEP08SIASM.Staging__v2_43_0__DEP08SIASM__Processed(); public void Staging__v2_43_4__DEP08SIASM__Processed() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__Processed();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__Archive() => _DEP08SIASM.Staging__v2_43_0__DEP08SIASM__Archive(); public void Staging__v2_43_4__DEP08SIASM__Archive() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__Archive();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__DEP08SIASM__Dummy() => _DEP08SIASM.Staging__v2_43_0__DEP08SIASM__Dummy(); public void Staging__v2_43_4__DEP08SIASM__Dummy() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__Dummy();
} }
#endif

View File

@ -1,6 +1,7 @@
#if v2_43_0
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Staging.v2_43_0; namespace Adaptation._Tests.Extract.Staging.v2_43_4;
[TestClass] [TestClass]
public class R34_EQPT public class R34_EQPT
@ -9,25 +10,26 @@ public class R34_EQPT
#pragma warning disable CA2254 #pragma warning disable CA2254
#pragma warning disable IDE0060 #pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_43_0.R34_EQPT _R34_EQPT; private static CreateSelfDescription.Staging.v2_43_4.R34_EQPT _R34_EQPT;
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
CreateSelfDescription.Staging.v2_43_0.R34_EQPT.ClassInitialize(testContext); CreateSelfDescription.Staging.v2_43_4.R34_EQPT.ClassInitialize(testContext);
_R34_EQPT = CreateSelfDescription.Staging.v2_43_0.R34_EQPT.EAFLoggingUnitTesting; _R34_EQPT = CreateSelfDescription.Staging.v2_43_4.R34_EQPT.EAFLoggingUnitTesting;
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__R34_EQPT__DownloadJpegFile() => _R34_EQPT.Staging__v2_43_0__R34_EQPT__DownloadJpegFile(); public void Staging__v2_43_4__R34_EQPT__DownloadJpegFile() => _R34_EQPT.Staging__v2_43_4__R34_EQPT__DownloadJpegFile();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__R34_EQPT__DownloadJpegFile637812143477007703__Normal() => _R34_EQPT.Staging__v2_43_0__R34_EQPT__DownloadJpegFile(); public void Staging__v2_43_4__R34_EQPT__DownloadJpegFile637812143477007703__Normal() => _R34_EQPT.Staging__v2_43_4__R34_EQPT__DownloadJpegFile();
} }
#endif

View File

@ -1,10 +1,11 @@
#if v2_43_0
using Adaptation.Shared; using Adaptation.Shared;
using Adaptation.Shared.Methods; using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Diagnostics; using System.Diagnostics;
using System.Reflection; using System.Reflection;
namespace Adaptation._Tests.Extract.Staging.v2_43_0; namespace Adaptation._Tests.Extract.Staging.v2_43_4;
[TestClass] [TestClass]
public class R34 public class R34
@ -13,29 +14,29 @@ public class R34
#pragma warning disable CA2254 #pragma warning disable CA2254
#pragma warning disable IDE0060 #pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_43_0.R34 _R34; private static CreateSelfDescription.Staging.v2_43_4.R34 _R34;
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
CreateSelfDescription.Staging.v2_43_0.R34.ClassInitialize(testContext); CreateSelfDescription.Staging.v2_43_4.R34.ClassInitialize(testContext);
_R34 = CreateSelfDescription.Staging.v2_43_0.R34.EAFLoggingUnitTesting; _R34 = CreateSelfDescription.Staging.v2_43_4.R34.EAFLoggingUnitTesting;
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__R34__jpeg() => _R34.Staging__v2_43_0__R34__jpeg(); public void Staging__v2_43_4__R34__jpeg() => _R34.Staging__v2_43_4__R34__jpeg();
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__R34__jpeg637812143477007703__Normal() public void Staging__v2_43_4__R34__jpeg638000598531758005__Normal()
{ {
string check = "*.jpeg"; string check = "*.jpeg";
_R34.Staging__v2_43_0__R34__jpeg(); _R34.Staging__v2_43_4__R34__jpeg();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _R34.AdaptationTesting.GetVariables(methodBase, check); string[] variables = _R34.AdaptationTesting.GetVariables(methodBase, check);
IFileRead fileRead = _R34.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _R34.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -67,3 +68,4 @@ public class R34
} }
} }
#endif

View File

@ -1,6 +1,7 @@
#if v2_43_0
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Staging.v2_43_0; namespace Adaptation._Tests.Extract.Staging.v2_43_4;
[TestClass] [TestClass]
public class R36_EQPT public class R36_EQPT
@ -9,19 +10,20 @@ public class R36_EQPT
#pragma warning disable CA2254 #pragma warning disable CA2254
#pragma warning disable IDE0060 #pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_43_0.R36_EQPT _R36_EQPT; private static CreateSelfDescription.Staging.v2_43_4.R36_EQPT _R36_EQPT;
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
CreateSelfDescription.Staging.v2_43_0.R36_EQPT.ClassInitialize(testContext); CreateSelfDescription.Staging.v2_43_4.R36_EQPT.ClassInitialize(testContext);
_R36_EQPT = CreateSelfDescription.Staging.v2_43_0.R36_EQPT.EAFLoggingUnitTesting; _R36_EQPT = CreateSelfDescription.Staging.v2_43_4.R36_EQPT.EAFLoggingUnitTesting;
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__R36_EQPT__DownloadJpegFile() => _R36_EQPT.Staging__v2_43_0__R36_EQPT__DownloadJpegFile(); public void Staging__v2_43_4__R36_EQPT__DownloadJpegFile() => _R36_EQPT.Staging__v2_43_4__R36_EQPT__DownloadJpegFile();
} }
#endif

View File

@ -1,6 +1,7 @@
#if v2_43_0
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Staging.v2_43_0; namespace Adaptation._Tests.Extract.Staging.v2_43_4;
[TestClass] [TestClass]
public class R36 public class R36
@ -9,19 +10,20 @@ public class R36
#pragma warning disable CA2254 #pragma warning disable CA2254
#pragma warning disable IDE0060 #pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_43_0.R36 _R36; private static CreateSelfDescription.Staging.v2_43_4.R36 _R36;
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
CreateSelfDescription.Staging.v2_43_0.R36.ClassInitialize(testContext); CreateSelfDescription.Staging.v2_43_4.R36.ClassInitialize(testContext);
_R36 = CreateSelfDescription.Staging.v2_43_0.R36.EAFLoggingUnitTesting; _R36 = CreateSelfDescription.Staging.v2_43_4.R36.EAFLoggingUnitTesting;
} }
#if true #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_43_0__R36__jpeg() => _R36.Staging__v2_43_0__R36__jpeg(); public void Staging__v2_43_4__R36__jpeg() => _R36.Staging__v2_43_4__R36__jpeg();
} }
#endif

View File

@ -0,0 +1,83 @@
#if true
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Staging.v2_56_0;
[TestClass]
public class DEP08SIASM
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_56_0.DEP08SIASM _DEP08SIASM;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Staging.v2_56_0.DEP08SIASM.ClassInitialize(testContext);
_DEP08SIASM = CreateSelfDescription.Staging.v2_56_0.DEP08SIASM.EAFLoggingUnitTesting;
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__DEP08SIASM__MoveMatchingFiles() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__MoveMatchingFiles();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__DEP08SIASM__OpenInsightMetrologyViewer() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__OpenInsightMetrologyViewer();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__DEP08SIASM__IQSSi() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__IQSSi();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__DEP08SIASM__OpenInsight() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__OpenInsight();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__DEP08SIASM__OpenInsightMetrologyViewerAttachments() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__OpenInsightMetrologyViewerAttachments();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__DEP08SIASM__APC() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__APC();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__DEP08SIASM__SPaCe() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__SPaCe();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__DEP08SIASM__Processed() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__Processed();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__DEP08SIASM__Archive() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__Archive();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__DEP08SIASM__Dummy() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__Dummy();
}
#endif

View File

@ -0,0 +1,35 @@
#if true
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Staging.v2_56_0;
[TestClass]
public class R34_EQPT
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_56_0.R34_EQPT _R34_EQPT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Staging.v2_56_0.R34_EQPT.ClassInitialize(testContext);
_R34_EQPT = CreateSelfDescription.Staging.v2_56_0.R34_EQPT.EAFLoggingUnitTesting;
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__R34_EQPT__DownloadJpegFile() => _R34_EQPT.Staging__v2_56_0__R34_EQPT__DownloadJpegFile();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__R34_EQPT__DownloadJpegFile637812143477007703__Normal() => _R34_EQPT.Staging__v2_56_0__R34_EQPT__DownloadJpegFile();
}
#endif

View File

@ -0,0 +1,71 @@
#if true
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Diagnostics;
using System.Reflection;
namespace Adaptation._Tests.Extract.Staging.v2_56_0;
[TestClass]
public class R34
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_56_0.R34 _R34;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Staging.v2_56_0.R34.ClassInitialize(testContext);
_R34 = CreateSelfDescription.Staging.v2_56_0.R34.EAFLoggingUnitTesting;
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__R34__jpeg() => _R34.Staging__v2_56_0__R34__jpeg();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__R34__jpeg638000598531758005__Normal()
{
string check = "*.jpeg";
_R34.Staging__v2_56_0__R34__jpeg();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _R34.AdaptationTesting.GetVariables(methodBase, check);
IFileRead fileRead = _R34.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF: false);
// var uri = $"http://{hostip}/set_output?input=0&output=0&venc_framerate={venc_framerate}&venc_gop={venc_gop}&venc_width={venc_width}&venc_height={venc_height}&venc_bitrate={venc_bitrate}&http_ts_uri={http_ts_uri}&http_flv_uri={http_flv_uri}&rtsp_uri={rtsp_uri}&rtmp_enable={rtmp_enable}&rtmp_uri={rtmp_uri}&rtmp_publish_uri={rtmp_publish_uri}&rtmp_publish_enable={rtmp_publish_enable}&http_ts_enable={http_ts_enable}&http_flv_enable={http_flv_enable}&rtsp_enable={rtsp_enable}&venc_profile={venc_profile}&http_hls_uri={http_hls_uri}&http_hls_enable={http_hls_enable}&venc_width_height_same_as_input={venc_width_height_same_as_input}&multicast_ip={multicast_ip}&multicast_port={multicast_port}&multicast_enable={multicast_enable}&venc_codec={venc_codec}&srt_enable={srt_enable}&srt_port={srt_port}&srt_publish_enable={srt_publish_enable}&srt_publish_uri={srt_publish_uri}&srt_key={srt_key}&srt_key_enable={srt_key_enable}&max_qp={venc_max_qp}";
// if (venc_rc_mode == "5")
// {
// uri += $"&ts_muxrate={venc_bitrate};
// }
// else
// {
// uri += $"&venc_rc_mode={venc_rc_mode}&ts_muxrate=0";
// }
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=30&venc_gop=30&venc_width=1920&venc_height=1080&venc_bitrate=2800&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655307410424
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=265&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655307485097
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326370050
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=1&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326507855
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=1&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326566457
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326739485
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326928562
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327093005
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327167711
// http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327315199
// http://10.95.154.28/set_adv?vga_auto_adjust=1
// http://10.95.154.28/set_time?sync_time=
// http://10.95.154.28/set_time?sync_time=1655307949&_=1655307949299
// http://10.95.154.28/get_status?_=1655307702476
}
}
#endif

View File

@ -0,0 +1,29 @@
#if true
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Staging.v2_56_0;
[TestClass]
public class R36_EQPT
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_56_0.R36_EQPT _R36_EQPT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Staging.v2_56_0.R36_EQPT.ClassInitialize(testContext);
_R36_EQPT = CreateSelfDescription.Staging.v2_56_0.R36_EQPT.EAFLoggingUnitTesting;
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__R36_EQPT__DownloadJpegFile() => _R36_EQPT.Staging__v2_56_0__R36_EQPT__DownloadJpegFile();
}
#endif

View File

@ -0,0 +1,29 @@
#if true
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Staging.v2_56_0;
[TestClass]
public class R36
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_56_0.R36 _R36;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Staging.v2_56_0.R36.ClassInitialize(testContext);
_R36 = CreateSelfDescription.Staging.v2_56_0.R36.EAFLoggingUnitTesting;
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__R36__jpeg() => _R36.Staging__v2_56_0__R36__jpeg();
}
#endif

View File

@ -305,7 +305,7 @@ public class AdaptationTesting : ISMTP
else else
{ {
results = Directory.GetFiles(mbn.TextFileDirectory, "*.txt", SearchOption.TopDirectoryOnly); results = Directory.GetFiles(mbn.TextFileDirectory, "*.txt", SearchOption.TopDirectoryOnly);
if (!string.IsNullOrEmpty(mbn.Ticks) && _HasWaitForProperty && !results.Any()) if (!string.IsNullOrEmpty(mbn.Ticks) && _HasWaitForProperty && results.Length == 0)
{ {
_ = Process.Start("explorer.exe", mbn.TextFileDirectory); _ = Process.Start("explorer.exe", mbn.TextFileDirectory);
File.WriteAllText(Path.Combine(mbn.TextFileDirectory, "_ Why.why"), string.Empty); File.WriteAllText(Path.Combine(mbn.TextFileDirectory, "_ Why.why"), string.Empty);
@ -343,7 +343,7 @@ public class AdaptationTesting : ISMTP
return result as T; return result as T;
} }
protected static CellInstanceVersion GetCellInstanceVersion(string url) public static CellInstanceVersion GetCellInstanceVersion(string url)
{ {
CellInstanceVersion result; CellInstanceVersion result;
byte[] byteArray; byte[] byteArray;
@ -373,9 +373,7 @@ public class AdaptationTesting : ISMTP
Tuple<string, CellInstanceVersion> result; Tuple<string, CellInstanceVersion> result;
CellInstanceVersion cellInstanceVersion; CellInstanceVersion cellInstanceVersion;
string cellInstanceServiceV2 = string.Concat("http://", _HostNameAndPort, "/CellInstanceServiceV2/", cellInstanceName, "/", cellInstanceVersionName, "/configuration"); string cellInstanceServiceV2 = string.Concat("http://", _HostNameAndPort, "/CellInstanceServiceV2/", cellInstanceName, "/", cellInstanceVersionName, "/configuration");
if (_CellInstanceVersions.ContainsKey(cellInstanceServiceV2)) if (!_CellInstanceVersions.TryGetValue(cellInstanceServiceV2, out cellInstanceVersion))
cellInstanceVersion = _CellInstanceVersions[cellInstanceServiceV2];
else
{ {
cellInstanceVersion = GetCellInstanceVersion(cellInstanceServiceV2); cellInstanceVersion = GetCellInstanceVersion(cellInstanceServiceV2);
_CellInstanceVersions.Add(cellInstanceServiceV2, cellInstanceVersion); _CellInstanceVersions.Add(cellInstanceServiceV2, cellInstanceVersion);
@ -401,7 +399,7 @@ public class AdaptationTesting : ISMTP
} }
} }
} }
if (!results.Any() || (!string.IsNullOrEmpty(cellInstanceConnectionName) && !results.ContainsKey(cellInstanceConnectionName))) if (results.Count == 0 || (!string.IsNullOrEmpty(cellInstanceConnectionName) && !results.ContainsKey(cellInstanceConnectionName)))
throw new Exception("Match not found (check test method name matches Mango)!"); throw new Exception("Match not found (check test method name matches Mango)!");
return results; return results;
} }
@ -413,9 +411,8 @@ public class AdaptationTesting : ISMTP
result = componentModelComponentsIndexes.ElementAt(0).Value; result = componentModelComponentsIndexes.ElementAt(0).Value;
else else
{ {
if (componentModelComponentsIndexes is null || !componentModelComponentsIndexes.ContainsKey(cellInstanceConnectionName)) if (componentModelComponentsIndexes is null || !componentModelComponentsIndexes.TryGetValue(cellInstanceConnectionName, out result))
throw new Exception(); throw new Exception();
result = componentModelComponentsIndexes[cellInstanceConnectionName];
} }
return result; return result;
} }
@ -487,7 +484,7 @@ public class AdaptationTesting : ISMTP
else if (i == 1) else if (i == 1)
_ = stringBuilder. _ = stringBuilder.
AppendLine(). AppendLine().
Append("static ").Append(cellInstanceNameWithoutHyphen).AppendLine("() => DummyRoot = @\"\\\\messv02ecc1.ec.local\\EC_Characterization_Si\\Dummy\";"). Append("static ").Append(cellInstanceNameWithoutHyphen).AppendLine("() => DummyRoot = @\"\\\\mesfs.infineon.com\\EC_Characterization_Si\\Dummy\";").
AppendLine(). AppendLine().
Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)"). Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)").
AppendLine("{"). AppendLine("{").
@ -565,7 +562,7 @@ public class AdaptationTesting : ISMTP
else if (i == 1) else if (i == 1)
{ {
if (componentsCellComponentCellComponent.Equipment.EquipmentType.Version != cellInstanceVersionName) if (componentsCellComponentCellComponent.Equipment.EquipmentType.Version != cellInstanceVersionName)
throw new Exception("Versions should match!"); throw new Exception($"Versions should match! {componentsCellComponentCellComponent.Equipment.EquipmentType.Version} != {cellInstanceVersionName}");
equipmentTypeName = componentsCellComponentCellComponent.Equipment.EquipmentType.Name; equipmentTypeName = componentsCellComponentCellComponent.Equipment.EquipmentType.Name;
_ = stringBuilder. _ = stringBuilder.
AppendLine("#if true"). AppendLine("#if true").
@ -596,7 +593,7 @@ public class AdaptationTesting : ISMTP
throw new Exception(); throw new Exception();
_ = stringBuilder.Clear(); _ = stringBuilder.Clear();
} }
if (componentsCellComponentCellComponentEquipmentDictionaryNames.Any() && string.IsNullOrEmpty(cellInstanceVersion.FrozenBy)) if (componentsCellComponentCellComponentEquipmentDictionaryNames.Count != 0 && string.IsNullOrEmpty(cellInstanceVersion.FrozenBy))
{ {
if (!cellInstanceVersion.CellCommunicatingRule.EndsWith(".Communicating") || !(from l in componentsCellComponentCellComponentEquipmentNames where l == cellInstanceVersion.CellCommunicatingRule.Split('.')[0] select true).Any()) if (!cellInstanceVersion.CellCommunicatingRule.EndsWith(".Communicating") || !(from l in componentsCellComponentCellComponentEquipmentNames where l == cellInstanceVersion.CellCommunicatingRule.Split('.')[0] select true).Any())
throw new Exception($"{methodName} - CellCommunicatingRule not correct in Mango!"); throw new Exception($"{methodName} - CellCommunicatingRule not correct in Mango!");
@ -621,14 +618,10 @@ public class AdaptationTesting : ISMTP
result = JsonSerializer.Deserialize<FileConnectorConfiguration>(json, jsonSerializerOptions); result = JsonSerializer.Deserialize<FileConnectorConfiguration>(json, jsonSerializerOptions);
if (string.IsNullOrEmpty(result.SourceFileFilter)) if (string.IsNullOrEmpty(result.SourceFileFilter))
result.SourceFileFilter = string.Empty; result.SourceFileFilter = string.Empty;
if (result.ErrorTargetFileLocation is null) result.ErrorTargetFileLocation ??= string.Empty;
result.ErrorTargetFileLocation = string.Empty; result.SourceFileLocation ??= string.Empty;
if (result.SourceFileLocation is null) result.TargetFileLocation ??= string.Empty;
result.SourceFileLocation = string.Empty; result.FolderAgeCheckIndividualSubFolders ??= false;
if (result.TargetFileLocation is null)
result.TargetFileLocation = string.Empty;
if (result.FolderAgeCheckIndividualSubFolders is null)
result.FolderAgeCheckIndividualSubFolders = false;
result.ConnectionSettings = new List<ConnectionSetting>(); result.ConnectionSettings = new List<ConnectionSetting>();
result.SourceFileFilters = result.SourceFileFilter.Split('|').ToList(); result.SourceFileFilters = result.SourceFileFilter.Split('|').ToList();
if (componentsCellComponentCellComponent.Equipment?.ConnectionSettings is not null) if (componentsCellComponentCellComponent.Equipment?.ConnectionSettings is not null)
@ -652,9 +645,7 @@ public class AdaptationTesting : ISMTP
Tuple<string, FileConnectorConfiguration> result; Tuple<string, FileConnectorConfiguration> result;
FileConnectorConfiguration fileConnectorConfiguration; FileConnectorConfiguration fileConnectorConfiguration;
string cellInstanceServiceV2With = string.Concat(cellInstanceVersionTuple.Item1, '/', cellInstanceConnectionName); string cellInstanceServiceV2With = string.Concat(cellInstanceVersionTuple.Item1, '/', cellInstanceConnectionName);
if (_FileConnectorConfigurations.ContainsKey(cellInstanceServiceV2With)) if (!_FileConnectorConfigurations.TryGetValue(cellInstanceServiceV2With, out fileConnectorConfiguration))
fileConnectorConfiguration = _FileConnectorConfigurations[cellInstanceServiceV2With];
else
{ {
Dictionary<string, int[]> componentModelComponentsIndexes = GetComponentModelComponentsIndexes(cellInstanceVersionTuple.Item2, cellInstanceConnectionName); Dictionary<string, int[]> componentModelComponentsIndexes = GetComponentModelComponentsIndexes(cellInstanceVersionTuple.Item2, cellInstanceConnectionName);
int[] cellInstanceConnectionNameIndexes = GetCellInstanceConnectionNameIndexes(cellInstanceConnectionName, componentModelComponentsIndexes); int[] cellInstanceConnectionNameIndexes = GetCellInstanceConnectionNameIndexes(cellInstanceConnectionName, componentModelComponentsIndexes);
@ -700,9 +691,7 @@ public class AdaptationTesting : ISMTP
int[] cellInstanceConnectionNameIndexes = GetCellInstanceConnectionNameIndexes(cellInstanceConnectionName, componentModelComponentsIndexes); int[] cellInstanceConnectionNameIndexes = GetCellInstanceConnectionNameIndexes(cellInstanceConnectionName, componentModelComponentsIndexes);
ComponentsCellComponentCellComponent componentsCellComponentCellComponent = cellInstanceVersion.ComponentModel.Components[cellInstanceConnectionNameIndexes[0]].Children[cellInstanceConnectionNameIndexes[1]]; ComponentsCellComponentCellComponent componentsCellComponentCellComponent = cellInstanceVersion.ComponentModel.Components[cellInstanceConnectionNameIndexes[0]].Children[cellInstanceConnectionNameIndexes[1]];
string equipmentTypeServiceV2 = string.Concat("http://", _HostNameAndPort, "/EquipmentTypeServiceV2/", componentsCellComponentCellComponent.Equipment.EquipmentType.Name, "/", componentsCellComponentCellComponent.Equipment.EquipmentType.Version, "/configuration"); string equipmentTypeServiceV2 = string.Concat("http://", _HostNameAndPort, "/EquipmentTypeServiceV2/", componentsCellComponentCellComponent.Equipment.EquipmentType.Name, "/", componentsCellComponentCellComponent.Equipment.EquipmentType.Version, "/configuration");
if (_EquipmentTypeVersions.ContainsKey(equipmentTypeServiceV2)) if (!_EquipmentTypeVersions.TryGetValue(equipmentTypeServiceV2, out equipmentTypeVersion))
equipmentTypeVersion = _EquipmentTypeVersions[equipmentTypeServiceV2];
else
{ {
equipmentTypeVersion = GetEquipmentTypeVersion(equipmentTypeServiceV2); equipmentTypeVersion = GetEquipmentTypeVersion(equipmentTypeServiceV2);
_EquipmentTypeVersions.Add(equipmentTypeServiceV2, equipmentTypeVersion); _EquipmentTypeVersions.Add(equipmentTypeServiceV2, equipmentTypeVersion);
@ -767,7 +756,7 @@ public class AdaptationTesting : ISMTP
string[] results; string[] results;
string equipmentDictionaryName; string equipmentDictionaryName;
string equipmentDictionaryVersionName; string equipmentDictionaryVersionName;
if (_SkipEquipmentDictionary || equipmentTypeVersion?.EventActionSequences is null || !equipmentTypeVersion.EventActionSequences.Any() || !(from l in equipmentTypeVersion.EventActionSequences where l.HandledEvent.StartsWith("Equipment.FileRead") select 1).Any()) if (_SkipEquipmentDictionary || equipmentTypeVersion?.EventActionSequences is null || equipmentTypeVersion.EventActionSequences.Length == 0 || !(from l in equipmentTypeVersion.EventActionSequences where l.HandledEvent.StartsWith("Equipment.FileRead") select 1).Any())
{ {
equipmentDictionaryName = string.Empty; equipmentDictionaryName = string.Empty;
equipmentDictionaryVersionName = string.Empty; equipmentDictionaryVersionName = string.Empty;
@ -838,9 +827,7 @@ public class AdaptationTesting : ISMTP
equipmentDictionaryVersion = null; equipmentDictionaryVersion = null;
else else
{ {
if (_EquipmentDictionaryVersions.ContainsKey(equipmentDictionaryServiceV2)) if (!_EquipmentDictionaryVersions.TryGetValue(equipmentDictionaryServiceV2, out equipmentDictionaryVersion))
equipmentDictionaryVersion = _EquipmentDictionaryVersions[equipmentDictionaryServiceV2];
else
{ {
equipmentDictionaryVersion = GetEquipmentDictionaryVersion(equipmentDictionaryServiceV2); equipmentDictionaryVersion = GetEquipmentDictionaryVersion(equipmentDictionaryServiceV2);
_EquipmentDictionaryVersions.Add(equipmentDictionaryServiceV2, equipmentDictionaryVersion); _EquipmentDictionaryVersions.Add(equipmentDictionaryServiceV2, equipmentDictionaryVersion);
@ -854,14 +841,15 @@ public class AdaptationTesting : ISMTP
{ {
Tuple<string, List<Tuple<string, string>>> result; Tuple<string, List<Tuple<string, string>>> result;
List<Tuple<string, string>> results; List<Tuple<string, string>> results;
List<Tuple<string, string>> collection;
if (_SkipEquipmentDictionary) if (_SkipEquipmentDictionary)
results = new List<Tuple<string, string>>(); results = new List<Tuple<string, string>>();
else if (string.IsNullOrEmpty(equipmentDictionaryVersionTuple.Item1)) else if (string.IsNullOrEmpty(equipmentDictionaryVersionTuple.Item1))
throw new Exception(); throw new Exception();
else if (equipmentDictionaryVersionTuple?.Item4?.Events?.Event is null) else if (equipmentDictionaryVersionTuple?.Item4?.Events?.Event is null)
results = new List<Tuple<string, string>>(); results = new List<Tuple<string, string>>();
else if (_EquipmentDictionaryEventDescriptions.ContainsKey(equipmentDictionaryVersionTuple.Item1)) else if (_EquipmentDictionaryEventDescriptions.TryGetValue(equipmentDictionaryVersionTuple.Item1, out collection))
results = _EquipmentDictionaryEventDescriptions[equipmentDictionaryVersionTuple.Item1]; results = collection;
else else
{ {
results = new List<Tuple<string, string>>(); results = new List<Tuple<string, string>>();
@ -878,7 +866,7 @@ public class AdaptationTesting : ISMTP
return result; return result;
} }
protected Dictionary<string, object> GetKeyValuePairs(string cellInstanceName, string cellInstanceVersionName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, List<Tuple<string, string>> equipmentDictionaryIsAlwaysEnabledEvents) protected Dictionary<string, object> GetKeyValuePairs(string cellInstanceName, string cellInstanceVersionName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, List<Tuple<string, string>> equipmentDictionaryIsAlwaysEnabledEvents, int edaConnectionPortNumber)
{ {
Dictionary<string, object> results = new() Dictionary<string, object> results = new()
{ {
@ -887,6 +875,7 @@ public class AdaptationTesting : ISMTP
{ nameof(cellInstanceName), cellInstanceName }, { nameof(cellInstanceName), cellInstanceName },
{ nameof(equipmentTypeName), equipmentTypeName }, { nameof(equipmentTypeName), equipmentTypeName },
{ nameof(cellInstanceVersionName), cellInstanceVersionName }, { nameof(cellInstanceVersionName), cellInstanceVersionName },
{ nameof(edaConnectionPortNumber), edaConnectionPortNumber },
{ nameof(equipmentDictionaryName), equipmentDictionaryName }, { nameof(equipmentDictionaryName), equipmentDictionaryName },
{ nameof(cellInstanceConnectionName), cellInstanceConnectionName }, { nameof(cellInstanceConnectionName), cellInstanceConnectionName },
{ nameof(FileConnectorConfiguration), fileConnectorConfiguration }, { nameof(FileConnectorConfiguration), fileConnectorConfiguration },
@ -943,7 +932,7 @@ public class AdaptationTesting : ISMTP
Tuple<string, IList<ModelObjectParameterDefinition>> modelObjectParametersTuple = GetModelObjectParameters(equipmentTypeVersionTuple); Tuple<string, IList<ModelObjectParameterDefinition>> modelObjectParametersTuple = GetModelObjectParameters(equipmentTypeVersionTuple);
Tuple<string, string, string, EquipmentDictionaryVersion> equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, mbn.CellInstanceConnectionName, equipmentTypeVersionTuple.Item4); Tuple<string, string, string, EquipmentDictionaryVersion> equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, mbn.CellInstanceConnectionName, equipmentTypeVersionTuple.Item4);
Tuple<string, List<Tuple<string, string>>> equipmentDictionaryIsAlwaysEnabledEventsTuple = GetEquipmentDictionaryIsAlwaysEnabledEventsTuple(equipmentDictionaryVersionTuple); Tuple<string, List<Tuple<string, string>>> equipmentDictionaryIsAlwaysEnabledEventsTuple = GetEquipmentDictionaryIsAlwaysEnabledEventsTuple(equipmentDictionaryVersionTuple);
Dictionary<string, object> objects = GetKeyValuePairs(mbn.CellInstanceName, mbn.CellInstanceVersionName, mbn.CellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, equipmentDictionaryIsAlwaysEnabledEventsTuple.Item2); Dictionary<string, object> objects = GetKeyValuePairs(mbn.CellInstanceName, mbn.CellInstanceVersionName, mbn.CellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, equipmentDictionaryIsAlwaysEnabledEventsTuple.Item2, cellInstanceVersionTuple.Item2.EdaConnection.PortNumber);
string json = JsonSerializer.Serialize(objects, new JsonSerializerOptions { WriteIndented = true }); string json = JsonSerializer.Serialize(objects, new JsonSerializerOptions { WriteIndented = true });
results = new string[] { fileInfo.FullName, json }; results = new string[] { fileInfo.FullName, json };
return results; return results;
@ -974,6 +963,8 @@ public class AdaptationTesting : ISMTP
fileConnectorConfigurationTuple.Item2.SourceFileFilters = sourceFileFilter.Split('|').ToList(); fileConnectorConfigurationTuple.Item2.SourceFileFilters = sourceFileFilter.Split('|').ToList();
} }
if (_TestContext.FullyQualifiedTestClassName.Contains(nameof(Extract))) if (_TestContext.FullyQualifiedTestClassName.Contains(nameof(Extract)))
{
try
{ {
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.ErrorTargetFileLocation)) if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.ErrorTargetFileLocation))
{ {
@ -996,7 +987,13 @@ public class AdaptationTesting : ISMTP
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder); _ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder);
} }
} }
result = FileHandlers.CellInstanceConnectionName.Get(this, fileParameter, mbn.CellInstanceName, mbn.CellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: false); catch (IOException ex)
{
if (!ex.Message.Contains("SMB1"))
throw;
}
}
result = FileHandlers.CellInstanceConnectionName.Get(this, fileParameter, mbn.CellInstanceName, mbn.CellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, dummyRuns, staticRuns, useCyclicalForDescription, connectionCount: cellInstanceVersionTuple.Item2.EquipmentConnections.Length);
return result; return result;
} }
@ -1013,7 +1010,7 @@ public class AdaptationTesting : ISMTP
string sourceFileLocation = string.Empty; string sourceFileLocation = string.Empty;
MethodBaseName mbn = GetMethodBaseName(methodBase); MethodBaseName mbn = GetMethodBaseName(methodBase);
string[] textFiles = GetTextFiles(mbn); string[] textFiles = GetTextFiles(mbn);
if (!textFiles.Any()) if (textFiles.Length == 0)
{ {
if (_HasWaitForProperty) if (_HasWaitForProperty)
throw new Exception("Set text file!"); throw new Exception("Set text file!");
@ -1077,7 +1074,7 @@ public class AdaptationTesting : ISMTP
else else
{ {
string[] files = Directory.GetFiles(ipdsfDirectory, searchPattern, SearchOption.TopDirectoryOnly); string[] files = Directory.GetFiles(ipdsfDirectory, searchPattern, SearchOption.TopDirectoryOnly);
if (files.Any()) if (files.Length != 0)
ipdsfFile = files[0]; ipdsfFile = files[0];
else else
ipdsfFile = searchPattern; ipdsfFile = searchPattern;
@ -1121,9 +1118,9 @@ public class AdaptationTesting : ISMTP
{ {
string[] pdsfFiles; string[] pdsfFiles;
pdsfFiles = Directory.GetFiles(searchDirectory, searchPattern, SearchOption.TopDirectoryOnly); pdsfFiles = Directory.GetFiles(searchDirectory, searchPattern, SearchOption.TopDirectoryOnly);
if (!pdsfFiles.Any()) if (pdsfFiles.Length == 0)
_ = Process.Start("explorer.exe", searchDirectory); _ = Process.Start("explorer.exe", searchDirectory);
Assert.IsTrue(pdsfFiles.Any(), "GetFiles check"); Assert.IsTrue(pdsfFiles.Length != 0, "GetFiles check");
results = GetLogisticsColumnsAndBody(pdsfFiles[0]); results = GetLogisticsColumnsAndBody(pdsfFiles[0]);
} }
Assert.IsFalse(string.IsNullOrEmpty(results.Item1)); Assert.IsFalse(string.IsNullOrEmpty(results.Item1));
@ -1256,6 +1253,8 @@ public class AdaptationTesting : ISMTP
{ {
string result; string result;
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract(); Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
if (extractResult is null)
throw new Exception($"Using pattern {variables[4]} no file was found <{variables[2]}>");
if (!fileRead.IsDuplicator) if (!fileRead.IsDuplicator)
{ {
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1)); Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));

View File

@ -26,7 +26,7 @@ public class LoggingUnitTesting : UnitTesting, IDisposable
base(testContext, declaringType) base(testContext, declaringType)
{ {
_LoggerFactory = new LoggerFactory(); _LoggerFactory = new LoggerFactory();
if (testContext is null || declaringType is null) if (testContext is null || declaringType is null || _IsEnvironment is null)
{ {
_ConfigurationRoot = null; _ConfigurationRoot = null;
_DefaultLogLevel = null; _DefaultLogLevel = null;

View File

@ -2,7 +2,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using System.Text.Json; using System.Text.Json;
@ -29,6 +28,10 @@ public class UnitTesting
{ {
string waitFor = "\"WaitFor\":"; string waitFor = "\"WaitFor\":";
string projectDirectory = GetProjectDirectory(testContext); string projectDirectory = GetProjectDirectory(testContext);
if (string.IsNullOrEmpty(projectDirectory))
_IsEnvironment = null;
else
{
_TestContextPropertiesAsJson = JsonSerializer.Serialize(testContext.Properties, new JsonSerializerOptions { WriteIndented = true }); _TestContextPropertiesAsJson = JsonSerializer.Serialize(testContext.Properties, new JsonSerializerOptions { WriteIndented = true });
_HasWaitForProperty = _TestContextPropertiesAsJson.Contains(waitFor); _HasWaitForProperty = _TestContextPropertiesAsJson.Contains(waitFor);
string vsCodeDirectory = Path.Combine(projectDirectory, ".vscode"); string vsCodeDirectory = Path.Combine(projectDirectory, ".vscode");
@ -55,27 +58,25 @@ public class UnitTesting
_IsEnvironment = new IsEnvironment(testCategory); _IsEnvironment = new IsEnvironment(testCategory);
} }
} }
if (_IsEnvironment is null) _IsEnvironment ??= new IsEnvironment(processesCount: null, nullASPNetCoreEnvironmentIsDevelopment: Debugger.IsAttached, nullASPNetCoreEnvironmentIsProduction: !Debugger.IsAttached);
_IsEnvironment = new IsEnvironment(processesCount: null, nullASPNetCoreEnvironmentIsDevelopment: Debugger.IsAttached, nullASPNetCoreEnvironmentIsProduction: !Debugger.IsAttached); }
} }
} }
internal static string GetProjectDirectory(TestContext testContext) internal static string GetProjectDirectory(TestContext testContext)
{ {
string result; string result;
string[] checkFiles = null; string[] checkFiles;
result = Path.GetDirectoryName(testContext.DeploymentDirectory); result = Path.GetDirectoryName(testContext.DeploymentDirectory);
for (int i = 0; i < int.MaxValue; i++) for (int i = 0; i < int.MaxValue; i++)
{ {
if (string.IsNullOrEmpty(result)) if (string.IsNullOrEmpty(result))
break; break;
checkFiles = Directory.GetFiles(result, "*.Tests.*proj", SearchOption.TopDirectoryOnly); checkFiles = Directory.GetFiles(result, "*.Tests.*proj", SearchOption.TopDirectoryOnly);
if (checkFiles.Any()) if (checkFiles.Length != 0)
break; break;
result = Path.GetDirectoryName(result); result = Path.GetDirectoryName(result);
} }
if (string.IsNullOrEmpty(result) || checkFiles is null || !checkFiles.Any())
throw new Exception(result);
return result; return result;
} }

View File

@ -0,0 +1,104 @@
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
namespace Adaptation._Tests.Static;
[TestClass]
public class DEP08SIASM : LoggingUnitTesting, IDisposable
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static DEP08SIASM LoggingUnitTesting { get; private set; }
public DEP08SIASM() : base(testContext: null, declaringType: null)
{
if (LoggingUnitTesting is null)
throw new Exception();
}
public DEP08SIASM(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new DEP08SIASM(testContext);
[ClassCleanup()]
public static void ClassCleanup()
{
LoggingUnitTesting?.Logger?.LogInformation("Cleanup");
LoggingUnitTesting?.Dispose();
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
[TestMethod]
public void TestDateTime()
{
DateTime dateTime = DateTime.Now;
Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString());
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging()
{
MethodBase methodBase = new StackFrame().GetMethod();
StringBuilder results = new();
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
{
new("DEP08SIASM", "v2.56.0"),
};
string staging = "http://mestsa07ec.infineon.com:9003/CellInstanceServiceV2";
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
foreach ((string cellInstanceName, string cellInstanceVersionName) in collection)
{
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{staging}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
_ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}");
}
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
if (!Directory.Exists(sourceDirectory))
_ = Directory.CreateDirectory(sourceDirectory);
File.WriteAllText(Path.Combine(sourceDirectory, $"{methodBase.Module.Name}-{methodBase.ReflectedType.Name}-{methodBase.Name}.tsv"), results.ToString());
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
[TestMethod]
public void CellInstanceVersionEdaConnectionPortNumber()
{
MethodBase methodBase = new StackFrame().GetMethod();
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
if (Directory.Exists(sourceDirectory))
{
string destinationDirectory = Path.Combine(sourceDirectory, "All");
if (!Directory.Exists(destinationDirectory))
_ = Directory.CreateDirectory(destinationDirectory);
List<string> lines = new();
string[] files = Directory.GetFiles(sourceDirectory, "*.tsv", SearchOption.TopDirectoryOnly);
foreach (string file in files)
lines.AddRange(File.ReadAllLines(file));
File.WriteAllLines(Path.Combine(destinationDirectory, $"{DateTime.Now.Ticks}.tsv"), lines.Distinct().OrderBy(l => l));
}
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
NonThrowTryCatch();
}
}

View File

@ -33,8 +33,7 @@ public class EAF : LoggingUnitTesting, IDisposable
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
if (LoggingUnitTesting is null) LoggingUnitTesting ??= new EAF(testContext);
LoggingUnitTesting = new EAF(testContext);
string dummyRoot = string.Empty; string dummyRoot = string.Empty;
bool skipEquipmentDictionary = true; bool skipEquipmentDictionary = true;
AdaptationTesting = new(dummyRoot, testContext, skipEquipmentDictionary, LoggingUnitTesting.TestContextPropertiesAsJson, LoggingUnitTesting.HasWaitForProperty); AdaptationTesting = new(dummyRoot, testContext, skipEquipmentDictionary, LoggingUnitTesting.TestContextPropertiesAsJson, LoggingUnitTesting.HasWaitForProperty);
@ -43,10 +42,8 @@ public class EAF : LoggingUnitTesting, IDisposable
[ClassCleanup()] [ClassCleanup()]
public static void ClassCleanup() public static void ClassCleanup()
{ {
if (LoggingUnitTesting.Logger is not null) LoggingUnitTesting?.Logger?.LogInformation("Cleanup");
LoggingUnitTesting.Logger.LogInformation("Cleanup"); LoggingUnitTesting?.Dispose();
if (LoggingUnitTesting is not null)
LoggingUnitTesting.Dispose();
} }
[TestMethod] [TestMethod]
@ -58,9 +55,91 @@ public class EAF : LoggingUnitTesting, IDisposable
HttpClient httpClient = new(); HttpClient httpClient = new();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string currentActiveVersionTag = "CurrentActiveVersion>"; string currentActiveVersionTag = "CurrentActiveVersion>";
string managementSite = "http://mestsa07ec.ec.local:9003/CellInstances/entity/"; string managementSite = "http://mestsa07ec.infineon.com:9003/CellInstances/entity/";
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
string[] cellInstances = new string[] { "R74-PLC", "MET08THFTIRQS408M", "HGCV1", "TENCOR1", "R53-EQPT", "EC", "TENCOR1-EDA", "R47-PLC-EDA", "SPV01", "CDE4-EDA", "MET08DDUPSP1TBI", "BACKLOG", "R34", "BIORAD5", "CDE3-EQPT", "BIORAD4-EDA", "CDE2-EDA", "CDE5-EDA", "DEP08SIHTRPLC", "R70-PLC-EDA", "MET08THFTIRSTRATUS", "R34-EQPT", "MET08ANLYSDIFAAST230", "BIORAD4", "CDE3-EDA", "CDE5-EQPT", "R72-PLC-EDA", "R74-PLC-EDA", "BACKLOG-EQPT", "CDE3", "TENCOR3-EDA", "R73-PLC-EDA", "R47-PLC", "SP101", "SPV01-EDA", "BIORAD3-EDA", "R70-PLC", "MET08RESIHGCV", "CDE4", "MET08RESIMAPCDE", "TENCOR2", "TENCOR3", "DEP08SIASM", "SP101-EQPT", "BIORAD2", "CDE2", "HGCV3-EDA", "HGCV2-EDA", "HGCV1-EDA", "BIORAD2-EDA", "TENCOR2-EDA", "CDE4-EQPT", "R72-PLC", "HGCV3", "HGCV2", "BIORAD3", "BIORAD5-EDA", "R34-EDA", "SP101-EDA", "R73-PLC", "CDE5", "MET08DDUPSFS6420" }; string[] cellInstances = new string[]
{
"BACKLOG-EQPT",
"BACKLOG",
"BIORAD2-EDA",
"BIORAD2",
"BIORAD3-EDA",
"BIORAD3",
"BIORAD4-EDA",
"BIORAD4",
"BIORAD5-EDA",
"BIORAD5",
"CDE2-EDA",
"CDE2",
"CDE3-EDA",
"CDE3-EQPT",
"CDE3",
"CDE4-EDA",
"CDE4-EQPT",
"CDE4",
"CDE5-EDA",
"CDE5-EQPT",
"CDE5",
"CDE6-EDA",
"CDE6-EQPT",
"CDE6",
"DEP08SIASM",
"DEP08SIHTRPLC",
"EC",
"HGCV1-EDA",
"HGCV1-EQPT",
"HGCV1",
"HGCV2-EDA",
"HGCV2-EQPT",
"HGCV2",
"HGCV3-EDA",
"HGCV3-EQPT",
"HGCV3",
"MET08ANLYSDIFAAST230",
"MET08DDUPSFS6420",
"MET08DDUPSP1TBI",
"MET08RESIHGCV",
"MET08RESIMAPCDE",
"MET08RESISRP2100",
"MET08THFTIRQS408M",
"MET08THFTIRSTRATUS",
"R34-EDA",
"R34-EQPT",
"R34",
"R47-PLC-EDA",
"R47-PLC",
"R53-EDA",
"R53-EQPT",
"R53",
"R55-EDA",
"R55-EQPT",
"R55",
"R70-PLC-EDA",
"R70-PLC",
"R72-PLC-EDA",
"R72-PLC",
"R73-PLC-EDA",
"R73-PLC",
"R74-PLC-EDA",
"R74-PLC",
"SP101-EDA",
"SP101-EQPT",
"SP101",
"SPV01-EDA",
"SPV01",
"SRP-EDA",
"SRP-EQPT",
"SRP",
"T21",
"T27-EDA",
"T27",
"TENCOR1-EDA",
"TENCOR1",
"TENCOR2-EDA",
"TENCOR2",
"TENCOR3-EDA",
"TENCOR3",
};
foreach (string cellInstance in cellInstances.OrderBy(l => l)) foreach (string cellInstance in cellInstances.OrderBy(l => l))
{ {
if (!cellInstance.Contains('-')) if (!cellInstance.Contains('-'))
@ -82,109 +161,50 @@ public class EAF : LoggingUnitTesting, IDisposable
} }
// 553,v2.19.0,R47-PLC-EDA,,,messtec102.EC.local // Staging - Getting configuration
// 553,v2.19.0,R47-PLC,,,messtec102.EC.local // 8500,v4.16.0,BIORAD2-EDA,,,messa010ec
// 7589,v2.43.3,CDE5-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,messtec102.EC.local // 8501,v4.16.0,BIORAD3-EDA,,,messa010ec
// 8034,v2.43.4,R34-EQPT,DownloadJpegFile.Communicating,DownloadJpegFile.NotCommunicating, // 8510,v4.16.0,BIORAD4-EDA,,,messa010ec
// 8034,v2.43.4,R53-EQPT,DownloadJpegFile.Communicating,DownloadJpegFile.NotCommunicating, // 8511,v4.16.0,BIORAD5-EDA,,,messa010ec
// 8134,v2.43.4,R34,jpeg.Communicating,jpeg.NotCommunicating, // 8520,v4.16.0,CDE2-EDA,,,messa010ec
// 8134,v4.15.0,R34-EDA,,,messtec102.EC.local // 8524,v4.16.0,CDE3-EDA,,,messa010ec
// 8409,v2.43.0,MET08ANLYSDIFAAST230,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,messtec102.EC.local // 8526,v2.49.2,CDE3-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,mestsa06ec
// 8439,v2.43.1,EC,,,messtec102.EC.local // 8524,v4.16.0,CDE4-EDA,,,messa010ec
// 8500,v2.43.0,BIORAD2,QS408M.Communicating,QS408M.NotCommunicating,messtec102.EC.local // 8526,v2.49.2,CDE4-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,mestsa06ec
// 8500,v4.15.0,BIORAD2-EDA,,,messtec102.EC.local // 8521,v4.16.0,CDE5-EDA,,,messa010ec
// 8501,v2.43.0,BIORAD3,QS408M.Communicating,QS408M.NotCommunicating,messtec102.EC.local // 7589,v2.49.2,CDE5-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,mestsa06ec
// 8501,v4.15.0,BIORAD3-EDA,,,messtec102.EC.local // 8522,v4.16.0,CDE6-EDA,,,messa010ec
// 8509,v2.43.2,MET08THFTIRQS408M,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,messtec102.EC.local // 7590,v2.49.2,CDE6-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,mestsa06ec
// 8510,v2.43.0,BIORAD4,QS408M.Communicating,QS408M.NotCommunicating,messtec102.EC.local // 8530,v4.16.0,HGCV1-EDA,,,messa010ec
// 8510,v4.15.0,BIORAD4-EDA,,,messtec102.EC.local // 8536,v2.12.3,HGCV1-EQPT,,,messa010ec
// 8511,v2.43.0,BIORAD5,QS408M.Communicating,QS408M.NotCommunicating,messtec102.EC.local // 8531,v4.16.0,HGCV2-EDA,,,messa010ec
// 8511,v4.15.0,BIORAD5-EDA,,,messtec102.EC.local // 8537,v2.12.3,HGCV2-EQPT,,,messa010ec
// 8519,v2.43.2,MET08THFTIRSTRATUS,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,messtec102.EC.local // 8532,v4.16.0,HGCV3-EDA,,,messa010ec
// 8520,v2.43.4,CDE2,txt.Communicating,txt.NotCommunicating,MESSA010EC.EC.local // 8538,v2.12.3,HGCV3-EQPT,,,messa010ec
// 8520,v4.15.0,CDE2-EDA,,,messtec102.EC.local // 8134,v4.16.0,R34-EDA,,,messa010ec
// 8521,v2.43.4,CDE5,RsM.Communicating,RsM.NotCommunicating,MESSA010EC.EC.local // 8034,v2.43.4,R34-EQPT,DownloadJpegFile.Communicating,DownloadJpegFile.NotCommunicating,messa010ec
// 8521,v4.15.0,CDE5-EDA,,,messtec102.EC.local // 553,v2.19.0,R47-PLC,,,messtec102
// 8524,v2.43.0,BACKLOG,json.Communicating,json.NotCommunicating, // 553,v2.19.0,R47-PLC-EDA,,,messtec102
// 8524,v2.43.4,CDE3,RsM.Communicating,RsM.NotCommunicating,MESSA010EC.EC.local // 8153,v4.16.0,R53-EDA,,,messa010ec
// 8524,v2.43.4,CDE4,RsM.Communicating,RsM.NotCommunicating,MESSA010EC.EC.local // 8653,v2.43.4,R53-EQPT,DownloadJpegFile.Communicating,DownloadJpegFile.NotCommunicating,messa010ec
// 8524,v4.15.0,CDE3-EDA,,,messtec102.EC.local // 8155,v4.16.0,R55-EDA,,,messa010ec
// 8524,v4.15.0,CDE4-EDA,,,messtec102.EC.local // 8655,v2.43.4,R55-EQPT,DownloadJpegFile.Communicating,DownloadJpegFile.NotCommunicating,messa010ec
// 8526,v2.43.0,CDE3-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,messtec102.EC.local // 8770,v2.19.0,R70-PLC,,,messtec102
// 8526,v2.43.3,CDE4-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating, // 8770,v1.0.1,R70-PLC-EDA,,,messtec102
// 8528,v2.43.0,BACKLOG-EQPT,ConvertExcelToJson.Communicating,ConvertExcelToJson.NotCommunicating, // 8772,v2.19.0,R72-PLC,,,messtec102
// 8529,v2.43.4,MET08RESIMAPCDE,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating, // 8772,v1.0.1,R72-PLC-EDA,,,messtec102
// 8530,v2.43.4,HGCV1,pcl.Communicating,pcl.NotCommunicating,MESSA010EC.EC.local // 8773,v2.19.0,R73-PLC,,,messtec102
// 8530,v4.15.0,HGCV1-EDA,,,messtec102.EC.local // 8773,v1.0.1,R73-PLC-EDA,,,messtec102
// 8531,v2.43.4,HGCV2,pcl.Communicating,pcl.NotCommunicating,MESSA010EC.EC.local // 8774,v2.19.0,R74-PLC,,,messtec102
// 8531,v4.15.0,HGCV2-EDA,,,messtec102.EC.local // 8774,v1.0.1,R74-PLC-EDA,,,messtec102
// 8532,v2.43.4,HGCV3,pcl.Communicating,pcl.NotCommunicating,MESSA010EC.EC.local // 8550,v4.16.0,SP101-EDA,,,messa010ec
// 8532,v4.15.0,HGCV3-EDA,,,messtec102.EC.local // 8555,v2.49.3,SP101-EQPT,MoveAllFiles.Communicating,MoveAllFiles.NotCommunicating,
// 8537,v2.43.4,DEP08SIASM,MonitorApplication.Communicating,MonitorApplication.NotCommunicating, // 8569,v4.16.0,SPV01-EDA,,,messa010ec
// 8538,v2.43.0,DEP08SIHTRPLC,ZipFilesByDate.Communicating,ZipFilesByDate.NotCommunicating, // 8574,v4.16.0,SRP-EDA,,,messa010ec
// 8539,v2.43.4,MET08RESIHGCV,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,MESSA010EC.EC.local // 8572,v2.49.2,SRP-EQPT,csv.Communicating,csv.NotCommunicating,mestsa06ec
// 8540,v2.43.4,TENCOR1,pcl.Communicating,pcl.NotCommunicating,MESSA010EC.EC.local // 7627,v4.16.0,T27-EDA,,,messa010ec
// 8540,v4.15.0,TENCOR1-EDA,,,messtec102.EC.local // 8540,v4.16.0,TENCOR1-EDA,,,messa010ec
// 8541,v2.43.4,TENCOR2,pcl.Communicating,pcl.NotCommunicating,MESSA010EC.EC.local // 8541,v4.16.0,TENCOR2-EDA,,,messa010ec
// 8541,v4.15.0,TENCOR2-EDA,,,messtec102.EC.local // 8542,v4.16.0,TENCOR3-EDA,,,messa010ec
// 8542,v2.43.4,TENCOR3,pcl.Communicating,pcl.NotCommunicating // Staging - Exit
// 8542,v4.15.0,TENCOR3-EDA,,,messtec102.EC.local // Cleanup
// 8549,v2.43.4,MET08DDUPSFS6420,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,
// 8550,v4.15.0,SP101-EDA,,,messtec102.EC.local
// 8551,v2.43.4,SP101,txt.Communicating,txt.NotCommunicating,MESSA010EC.EC.local
// 8555,v2.43.0,SP101-EQPT,MoveAllFiles.Communicating,MoveAllFiles.NotCommunicating,messtec102.EC.local
// 8559,v2.43.4,MET08DDUPSP1TBI,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,MESSA010EC.EC.local
// 8569,v2.43.0,SPV01,,,messtec102.EC.local
// 8569,v4.15.0,SPV01-EDA,,,messtec102.EC.local
// 8770,v1.0.1,R70-PLC-EDA,,,messtec102.EC.local
// 8770,v2.19.0,R70-PLC,,,messtec102.EC.local
// 8772,v1.0.1,R72-PLC-EDA,,,messtec102.EC.local
// 8772,v2.19.0,R72-PLC,,,messtec102.EC.local
// 8773,v1.0.1,R73-PLC-EDA,,,messtec102.EC.local
// 8773,v2.19.0,R73-PLC,,,messtec102.EC.local
// 8774,v1.0.1,R74-PLC-EDA,,,messtec102.EC.local
// 8774,v2.19.0,R74-PLC,,,messtec102.EC.local
// p p v i
// 553 553 v2.19.0 R47-PLC
// 7589 7589 v2.43.3 CDE5-EQPT
// 8034 8034 v2.43.4 R34-EQPT
// 8034
// 8134 8134 v2.43.4 R34
// 8409 8409 v2.43.0 MET08ANLYSDIFAAST230
// 8439 8439 v2.43.1 EC
// 8500 8500 v2.43.0 BIORAD2
// 8501 8501 v2.43.0 BIORAD3
// 8509 8509 v2.43.2 MET08THFTIRQS408M
// 8510 8510 v2.43.0 BIORAD4
// 8511 8511 v2.43.0 BIORAD5
// 8519 8519 v2.43.2 MET08THFTIRSTRATUS
// 8520 8520 v2.43.4 CDE2
// 8521 8521 v2.43.4 CDE5
// 8524
// 8524 8524 v2.43.4 CDE3
// 8524 v2.43.4 CDE4
// 8526 8526 v2.43.0 CDE3-EQPT
// 8526 v2.43.3 CDE4-EQPT
// 8528 8528 v2.43.0 BACKLOG-EQPT
// 8529 8529 v2.43.4 MET08RESIMAPCDE
// 8530 8530 v2.43.4 HGCV1
// 8531 8531 v2.43.4 HGCV2
// 8532 8532 v2.43.4 HGCV3
// 8537 8537 v2.43.4 DEP08SIASM
// 8538 8538 v2.43.0 DEP08SIHTRPLC
// 8539 8539 v2.43.4 MET08RESIHGCV
// 8540 8540 v2.43.4 TENCOR1
// 8541 8541 v2.43.4 TENCOR2
// 8542 8542 v2.43.4 TENCOR3
// 8549 8549 v2.43.4 MET08DDUPSFS6420
// 8551 8551 v2.43.4 SP101
// 8555 8555 v2.43.0 SP101-EQPT
// 8559 8559 v2.43.4 MET08DDUPSP1TBI
// 8569 8569 v2.43.0 SPV01
// 8770 8770 v2.19.0 R70-PLC
// 8772 8772 v2.19.0 R72-PLC
// 8773 8773 v2.19.0 R73-PLC
// 8774 8774 v2.19.0 R74-PLC
// 8775 v2.43.0 BACKLOG
// 8653 v2.43.4 R53-EQPT

View File

@ -0,0 +1,131 @@
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
namespace Adaptation._Tests.Static;
[TestClass]
public class JPEG : LoggingUnitTesting, IDisposable
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static JPEG LoggingUnitTesting { get; private set; }
public JPEG() : base(testContext: null, declaringType: null)
{
if (LoggingUnitTesting is null)
throw new Exception();
}
public JPEG(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new JPEG(testContext);
[ClassCleanup()]
public static void ClassCleanup()
{
LoggingUnitTesting?.Logger?.LogInformation("Cleanup");
LoggingUnitTesting?.Dispose();
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void TestDescriptor()
{
MethodBase methodBase = new StackFrame().GetMethod();
string fileName = "D:/Tmp/phares/R53-EQPT_638005905604624544 - Run Wafer.jpeg";
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
// (float pageMeanConfidence, string text, List<string> blocks) = FileHandlers.jpeg.ProcessData.Parse(fileName, new(), 0, 0, 0, 0, 0, 0);
List<(float pageMeanConfidence, string text, List<string> blocks)> collection = FileHandlers.jpeg.ProcessData.Parse(fileName);
Assert.IsTrue(collection.Count != 0);
foreach ((float pageMeanConfidence, string text, List<string> blocks) in collection)
{
Assert.IsTrue(pageMeanConfidence > 0);
Assert.IsTrue(!string.IsNullOrEmpty(text));
Assert.IsTrue(blocks.Count != 0);
// Normal images
// "RECIPE:\nte end\nte a ee)\nAcne\n"
// Grayscale
// "RECIPE:\nEee en\nRECIPE e943\n\ncera ke\n"
// Grayscale Inverted
// "RECIPE:\nOT6_10PH. 60.3.0\nRECIPE e943\nASgMe\n"
// BW
// "RECIPE\nCTG.}0PH. 60.3.0\nRECIPE #943\nAGM e\n"
}
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging()
{
MethodBase methodBase = new StackFrame().GetMethod();
StringBuilder results = new();
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
{
new("R34", "v2.56.0"),
new("R53", "v2.56.0"),
new("R55", "v2.56.0"),
new("R34-EQPT", "v2.56.0"),
new("R53-EQPT", "v2.56.0"),
new("R55-EQPT", "v2.56.0"),
};
string staging = "http://mestsa07ec.infineon.com:9003/CellInstanceServiceV2";
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
foreach ((string cellInstanceName, string cellInstanceVersionName) in collection)
{
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{staging}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
_ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}");
}
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
if (!Directory.Exists(sourceDirectory))
_ = Directory.CreateDirectory(sourceDirectory);
File.WriteAllText(Path.Combine(sourceDirectory, $"{methodBase.Module.Name}-{methodBase.ReflectedType.Name}-{methodBase.Name}.tsv"), results.ToString());
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
[TestMethod]
public void CellInstanceVersionEdaConnectionPortNumber()
{
MethodBase methodBase = new StackFrame().GetMethod();
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
if (Directory.Exists(sourceDirectory))
{
string destinationDirectory = Path.Combine(sourceDirectory, "All");
if (!Directory.Exists(destinationDirectory))
_ = Directory.CreateDirectory(destinationDirectory);
List<string> lines = new();
string[] files = Directory.GetFiles(sourceDirectory, "*.tsv", SearchOption.TopDirectoryOnly);
foreach (string file in files)
lines.AddRange(File.ReadAllLines(file));
File.WriteAllLines(Path.Combine(destinationDirectory, $"{DateTime.Now.Ticks}.tsv"), lines.Distinct().OrderBy(l => l));
}
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
NonThrowTryCatch();
}
}

View File

@ -27,19 +27,13 @@ public class XML : LoggingUnitTesting, IDisposable
{ } { }
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new XML(testContext);
{
if (LoggingUnitTesting is null)
LoggingUnitTesting = new XML(testContext);
}
[ClassCleanup()] [ClassCleanup()]
public static void ClassCleanup() public static void ClassCleanup()
{ {
if (LoggingUnitTesting.Logger is not null) LoggingUnitTesting?.Logger?.LogInformation("Cleanup");
LoggingUnitTesting.Logger.LogInformation("Cleanup"); LoggingUnitTesting?.Dispose();
if (LoggingUnitTesting is not null)
LoggingUnitTesting.Dispose();
} }
[TestMethod] [TestMethod]

View File

@ -45,7 +45,7 @@
"Password": "tVyC7uPHtScZR8NLInSaxQ==" "Password": "tVyC7uPHtScZR8NLInSaxQ=="
}, },
{ {
"Use": true, "Use": false,
"Letter": "i", "Letter": "i",
"Share": "\\\\messdv002.na.infineon.com\\Candela", "Share": "\\\\messdv002.na.infineon.com\\Candela",
"User": "INFINEON\\MESGaNEAF", "User": "INFINEON\\MESGaNEAF",
@ -59,7 +59,7 @@
"Password": "tLIPgqM6R9hVQOteRnTHwPqIg3Zxv8CohTjFkjkFz8k=" "Password": "tLIPgqM6R9hVQOteRnTHwPqIg3Zxv8CohTjFkjkFz8k="
}, },
{ {
"Use": true, "Use": false,
"Letter": "k", "Letter": "k",
"Share": "\\\\messdv002.na.infineon.com\\GaN_NEC\\Characterization", "Share": "\\\\messdv002.na.infineon.com\\GaN_NEC\\Characterization",
"User": "INFINEON\\MESGaNEAF", "User": "INFINEON\\MESGaNEAF",
@ -80,49 +80,49 @@
"Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00=" "Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00="
}, },
{ {
"Use": true, "Use": false,
"Letter": "n", "Letter": "n",
"Share": "\\\\10.95.154.22\\C", "Share": "\\\\10.95.154.22\\C",
"User": "10.95.154.22\\Aixtron", "User": "10.95.154.22\\Aixtron",
"Password": "DYVBOr2HJdB7KOhd/IFhLA==" "Password": "DYVBOr2HJdB7KOhd/IFhLA=="
}, },
{ {
"Use": true, "Use": false,
"Letter": "o", "Letter": "o",
"Share": "\\\\10.95.154.16\\Aixtron", "Share": "\\\\10.95.154.16\\Aixtron",
"User": "10.95.154.16\\Aixtron", "User": "10.95.154.16\\Aixtron",
"Password": "DYVBOr2HJdB7KOhd/IFhLA==" "Password": "DYVBOr2HJdB7KOhd/IFhLA=="
}, },
{ {
"Use": true, "Use": false,
"Letter": "p", "Letter": "p",
"Share": "\\\\10.95.154.15\\Aixtron", "Share": "\\\\10.95.154.15\\Aixtron",
"User": "10.95.154.15\\Aixtron", "User": "10.95.154.15\\Aixtron",
"Password": "DYVBOr2HJdB7KOhd/IFhLA==" "Password": "DYVBOr2HJdB7KOhd/IFhLA=="
}, },
{ {
"Use": true, "Use": false,
"Letter": "q", "Letter": "q",
"Share": "\\\\10.95.154.21\\Data", "Share": "\\\\10.95.154.21\\Data",
"User": "10.95.154.21\\XRD04Admin", "User": "10.95.154.21\\XRD04Admin",
"Password": "v1NOsEOCvbnhzKabspPcCQ==" "Password": "v1NOsEOCvbnhzKabspPcCQ=="
}, },
{ {
"Use": true, "Use": false,
"Letter": "r", "Letter": "r",
"Share": "\\\\10.95.154.23\\Data", "Share": "\\\\10.95.154.23\\Data",
"User": "\"10.95.154.23\\infineon us\"", "User": "\"10.95.154.23\\infineon us\"",
"Password": "rzXkXdHKetDfsukhZKW0yA==" "Password": "rzXkXdHKetDfsukhZKW0yA=="
}, },
{ {
"Use": true, "Use": false,
"Letter": "s", "Letter": "s",
"Share": "\\\\messv02ecc1.ec.local\\EC_EAFRepository", "Share": "\\\\messv02ecc1.ec.local\\EC_EAFRepository",
"User": "EC\\ECMESEAF", "User": "EC\\ECMESEAF",
"Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00=" "Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00="
}, },
{ {
"Use": true, "Use": false,
"Letter": "t", "Letter": "t",
"Share": "\\\\messv02ecc1.ec.local\\EC_EDA", "Share": "\\\\messv02ecc1.ec.local\\EC_EDA",
"User": "EC\\ECEDASvc", "User": "EC\\ECEDASvc",

View File

@ -45,7 +45,7 @@
"Password": "tVyC7uPHtScZR8NLInSaxQ==" "Password": "tVyC7uPHtScZR8NLInSaxQ=="
}, },
{ {
"Use": true, "Use": false,
"Letter": "i", "Letter": "i",
"Share": "\\\\messdv002.na.infineon.com\\Candela", "Share": "\\\\messdv002.na.infineon.com\\Candela",
"User": "INFINEON\\MESGaNEAF", "User": "INFINEON\\MESGaNEAF",
@ -59,7 +59,7 @@
"Password": "tLIPgqM6R9hVQOteRnTHwPqIg3Zxv8CohTjFkjkFz8k=" "Password": "tLIPgqM6R9hVQOteRnTHwPqIg3Zxv8CohTjFkjkFz8k="
}, },
{ {
"Use": true, "Use": false,
"Letter": "k", "Letter": "k",
"Share": "\\\\messdv002.na.infineon.com\\GaN_NEC\\Characterization", "Share": "\\\\messdv002.na.infineon.com\\GaN_NEC\\Characterization",
"User": "INFINEON\\MESGaNEAF", "User": "INFINEON\\MESGaNEAF",
@ -80,49 +80,49 @@
"Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00=" "Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00="
}, },
{ {
"Use": true, "Use": false,
"Letter": "n", "Letter": "n",
"Share": "\\\\10.95.154.22\\C", "Share": "\\\\10.95.154.22\\C",
"User": "10.95.154.22\\Aixtron", "User": "10.95.154.22\\Aixtron",
"Password": "DYVBOr2HJdB7KOhd/IFhLA==" "Password": "DYVBOr2HJdB7KOhd/IFhLA=="
}, },
{ {
"Use": true, "Use": false,
"Letter": "o", "Letter": "o",
"Share": "\\\\10.95.154.16\\Aixtron", "Share": "\\\\10.95.154.16\\Aixtron",
"User": "10.95.154.16\\Aixtron", "User": "10.95.154.16\\Aixtron",
"Password": "DYVBOr2HJdB7KOhd/IFhLA==" "Password": "DYVBOr2HJdB7KOhd/IFhLA=="
}, },
{ {
"Use": true, "Use": false,
"Letter": "p", "Letter": "p",
"Share": "\\\\10.95.154.15\\Aixtron", "Share": "\\\\10.95.154.15\\Aixtron",
"User": "10.95.154.15\\Aixtron", "User": "10.95.154.15\\Aixtron",
"Password": "DYVBOr2HJdB7KOhd/IFhLA==" "Password": "DYVBOr2HJdB7KOhd/IFhLA=="
}, },
{ {
"Use": true, "Use": false,
"Letter": "q", "Letter": "q",
"Share": "\\\\10.95.154.21\\Data", "Share": "\\\\10.95.154.21\\Data",
"User": "10.95.154.21\\XRD04Admin", "User": "10.95.154.21\\XRD04Admin",
"Password": "v1NOsEOCvbnhzKabspPcCQ==" "Password": "v1NOsEOCvbnhzKabspPcCQ=="
}, },
{ {
"Use": true, "Use": false,
"Letter": "r", "Letter": "r",
"Share": "\\\\10.95.154.23\\Data", "Share": "\\\\10.95.154.23\\Data",
"User": "\"10.95.154.23\\infineon us\"", "User": "\"10.95.154.23\\infineon us\"",
"Password": "rzXkXdHKetDfsukhZKW0yA==" "Password": "rzXkXdHKetDfsukhZKW0yA=="
}, },
{ {
"Use": true, "Use": false,
"Letter": "s", "Letter": "s",
"Share": "\\\\messv02ecc1.ec.local\\EC_EAFRepository", "Share": "\\\\messv02ecc1.ec.local\\EC_EAFRepository",
"User": "EC\\ECMESEAF", "User": "EC\\ECMESEAF",
"Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00=" "Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00="
}, },
{ {
"Use": true, "Use": false,
"Letter": "t", "Letter": "t",
"Share": "\\\\messv02ecc1.ec.local\\EC_EDA", "Share": "\\\\messv02ecc1.ec.local\\EC_EDA",
"User": "EC\\ECEDASvc", "User": "EC\\ECEDASvc",

View File

@ -7,17 +7,11 @@
"CA-CreateSelfDescription.Staging.v2_43_4-DEP08SIASM": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~DEP08SIASM\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", "CA-CreateSelfDescription.Staging.v2_43_4-DEP08SIASM": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~DEP08SIASM\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
"DA-CreateSelfDescription.Staging.v2_43_4": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", "DA-CreateSelfDescription.Staging.v2_43_4": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
"EA-Extract.Staging.v2_43_4-R34_EQPT-Staging__v2_43_4__R34_EQPT__DownloadJpegFile637812143477007703__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~R34_EQPT & Name~Staging__v2_43_4__R34_EQPT__DownloadJpegFile637812143477007703__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", "EA-Extract.Staging.v2_43_4-R34_EQPT-Staging__v2_43_4__R34_EQPT__DownloadJpegFile637812143477007703__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~R34_EQPT & Name~Staging__v2_43_4__R34_EQPT__DownloadJpegFile637812143477007703__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
"FA-Extract.Staging.v2_43_4-R34-Staging__v2_43_4__R34__jpeg637812143477007703__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~R34 & Name~Staging__v2_43_4__R34__jpeg637812143477007703__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", "FA-Extract.Staging.v2_43_4-R34-Staging__v2_43_4__R34__jpeg638000598531758005__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~R34 & Name~Staging__v2_43_4__R34__jpeg638000598531758005__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
"GA-Extract.Staging.v2_43_4-R34-Staging__v2_43_4__DEP08SIASM__DEP08SIASM__637825304581476827__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~DEP08SIASM & Name~Staging__v2_43_4__DEP08SIASM__DEP08SIASM__637825304581476827__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", "GA-Extract.Staging.v2_43_4-R34-Staging__v2_43_4__DEP08SIASM__DEP08SIASM__637825304581476827__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~DEP08SIASM & Name~Staging__v2_43_4__DEP08SIASM__DEP08SIASM__637825304581476827__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
"Alpha": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "Alpha": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
"nuget-clear": "dotnet nuget locals all --clear", "kanbn.board": "kanbn board",
"build": "dotnet build --runtime win-x64 --self-contained", "kanbn.board.json": "kanbn board -j > .kanbn/board.json",
"build-Package-Management": "dotnet build --runtime win-x64 --self-contained --source https://packagemanagement.eu.infineon.com:4430/api/v2/",
"build-nuget-And-Package-Management": "dotnet build --runtime win-x64 --self-contained --source https://api.nuget.org/v3/index.json --source https://packagemanagement.eu.infineon.com:4430/api/v2/",
"build-All-Sources": "dotnet build --runtime win-x64 --self-contained --source https://api.nuget.org/v3/index.json --source https://packagemanagement.eu.infineon.com:4430/api/v2/ --source https://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json --source http://192.168.0.73:5002/v3/index.json",
"dotnet-format": "dotnet format --report .vscode --verbosity detailed --severity warn",
"MSBuild": "\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe\" /target:Build /restore:True /p:RestoreSources=https://api.nuget.org/v3/index.json%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=Debug;TargetFrameworkVersion=v4.8 ../DEP08SIASM.csproj",
"pull": "git pull",
"garbage-collect": "git gc" "garbage-collect": "git gc"
} }
} }

View File

@ -11,7 +11,8 @@
<RootNamespace>DEP08SIASM</RootNamespace> <RootNamespace>DEP08SIASM</RootNamespace>
<AssemblyName>DEP08SIASM</AssemblyName> <AssemblyName>DEP08SIASM</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<RuntimeIdentifier>win-x86</RuntimeIdentifier> <RuntimeIdentifier Condition="'$(Configuration)' == 'Debug'">win-x86</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(Configuration)' == 'Release'">win</RuntimeIdentifier>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
@ -38,6 +39,12 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v4.8' ">
<DefineConstants>NETFRAMEWORK;NET20;NET35;NET40;NET45;NET451;NET452;NET46;NET461;NET462;NET47;NET471;NET472;NET48;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<ItemGroup>
<RuntimeHostConfigurationOption Include="AssemblyName" Value="DEP08SIASM" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
@ -149,7 +156,7 @@
<Version>4.7.0</Version> <Version>4.7.0</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Infineon.EAF.Runtime"> <PackageReference Include="Infineon.EAF.Runtime">
<Version>2.43.0</Version> <Version>2.56.0</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Instances"> <PackageReference Include="Instances">
<Version>1.6.1</Version> <Version>1.6.1</Version>

View File

@ -165,7 +165,7 @@ public partial class FileRead : FileReaderHandler, ISMTP
Equipment.SelfDescriptionBuilder.AddParameterTypeDefinition(structuredType); Equipment.SelfDescriptionBuilder.AddParameterTypeDefinition(structuredType);
} }
if (!parameterTypeDefinitions.ContainsKey(jsonProperty.Value.ValueKind)) if (!parameterTypeDefinitions.ContainsKey(jsonProperty.Value.ValueKind))
throw new Exception(string.Concat('{', jsonProperty.Value.ValueKind, "} is not mapped!")); throw new Exception(string.Concat('<', jsonProperty.Name, "> {", jsonProperty.Value.ValueKind, "} is not mapped!"));
} }
foreach (JsonProperty jsonProperty in jsonProperties) foreach (JsonProperty jsonProperty in jsonProperties)
{ {
@ -197,7 +197,7 @@ public partial class FileRead : FileReaderHandler, ISMTP
FileConnectorConfiguration fileConnectorConfiguration = Mapper.Map(Configuration); FileConnectorConfiguration fileConnectorConfiguration = Mapper.Map(Configuration);
string parameterizedModelObjectDefinitionType = methodBase.DeclaringType.FullName; string parameterizedModelObjectDefinitionType = methodBase.DeclaringType.FullName;
IList<ModelObjectParameterDefinition> modelObjectParameters = Mapper.Map(ConfiguredParameters); IList<ModelObjectParameterDefinition> modelObjectParameters = Mapper.Map(ConfiguredParameters);
_FileRead = CellInstanceConnectionName.Get(this, FileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, _DummyRuns, _StaticRuns, _UseCyclicalForDescription, isEAFHosted: true); _FileRead = CellInstanceConnectionName.Get(this, FileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, _DummyRuns, _StaticRuns, _UseCyclicalForDescription, connectionCount: null);
if (_FileRead.IsEvent) if (_FileRead.IsEvent)
AddParameterRangeAndEvent(); AddParameterRangeAndEvent();
} }
@ -338,7 +338,7 @@ public partial class FileRead : FileReaderHandler, ISMTP
if (modelObjectParameterDefinitionJsonElement.ValueKind != JsonValueKind.Array) if (modelObjectParameterDefinitionJsonElement.ValueKind != JsonValueKind.Array)
throw new Exception(); throw new Exception();
IList<ModelObjectParameterDefinition> modelObjectParameters = JsonSerializer.Deserialize<IList<ModelObjectParameterDefinition>>(modelObjectParameterDefinitionJsonElement.ToString(), jsonSerializerOptions); IList<ModelObjectParameterDefinition> modelObjectParameters = JsonSerializer.Deserialize<IList<ModelObjectParameterDefinition>>(modelObjectParameterDefinitionJsonElement.ToString(), jsonSerializerOptions);
_FileRead = CellInstanceConnectionName.Get(this, FileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, _DummyRuns, _StaticRuns, _UseCyclicalForDescription, isEAFHosted: false); _FileRead = CellInstanceConnectionName.Get(this, FileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, _DummyRuns, _StaticRuns, _UseCyclicalForDescription, connectionCount: null);
results = _FileRead.ReExtract(); results = _FileRead.ReExtract();
if (results?.Item2 is null) if (results?.Item2 is null)
throw new Exception(); throw new Exception();

172
Jenkinsfile vendored
View File

@ -1,172 +0,0 @@
#!/usr/bin/env groovy
/* groovylint-disable CompileStatic, ConsecutiveStringConcatenation, DuplicateNumberLiteral, DuplicateStringLiteral, LineLength, NestedBlockDepth, NoDef, VariableTypeRequired */
import groovy.transform.Field
@Field String _DDrive = 'D:/'
@Field String _AssemblyName = '...'
@Field String _TargetLocation = '...'
@Field String _GitCommitSeven = '...'
@Field String _GitName = 'DEP08SIASM'
@Field String _TestProjectDirectory = 'Adaptation'
@Field String _AgentStaging = 'mestsa07ec-ecmeseaf'
@Field String _DDriveNet = "${_DDrive}Framework4.8"
@Field String _AgentProduction = 'messa08ec-ecmeseaf'
@Field String _AgentDevelopment = 'mestsa003-mesedasvc'
@Field String _ProgramFilesDotnet = 'C:/Program Files/dotnet/dotnet.exe'
@Field String _ProgramFilesMSBuild = 'C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe'
pipeline {
agent {
label env.JENKINS_ENVIRONMENT == 'Development' ? _AgentDevelopment : env.JENKINS_ENVIRONMENT == 'Staging' ? _AgentStaging : env.JENKINS_ENVIRONMENT == 'Production' ? _AgentProduction : 'Else'
}
parameters {
string(name: 'GIT_SERVER', defaultValue: env.JENKINS_ENVIRONMENT == 'Development' ? 'mestsa003.infineon.com' : 'mestsa07ec.ec.local', description: 'git server')
string(name: 'DEFAULT_FILE_SERVER', defaultValue: env.JENKINS_ENVIRONMENT == 'Development' ? 'messv02ecc1_ec_local' : 'messv02ecc1.ec.local', description: 'Default file server...')
}
stages {
// stage('Git') {
// steps {
// bat(returnStatus: true, script: 'git init')
// bat(returnStatus: true, script: 'git remote add origin \\\\' + params.GIT_SERVER + '\\Git\\' + _GitName + '.git')
// bat(returnStatus: true, script: 'git pull origin master')
// }
// }
stage('Setup') {
steps {
script {
_AssemblyName = "${env.JOB_NAME}"
// _GitCommitSeven = '1234567'
_GitCommitSeven = env.GIT_COMMIT.substring(0, 7)
def files = findFiles(glob: '*.csproj')
if (files.length != 1) {
error("Build failed because couldn't find a *.csproj file")
}
echo """
${files[0].name}
${files[0].path}
${files[0].directory}
${files[0].length}
${files[0].lastModified}
"""
_AssemblyName = files[0].name.split('[.]csproj')[0]
_TargetLocation = "\\\\${params.DEFAULT_FILE_SERVER}\\EC_EAFRepository\\${env.JENKINS_ENVIRONMENT}\\DeploymentStorage\\Adaptation_${_AssemblyName}"
}
}
}
stage('Info') {
steps {
echo "_AssemblyName ${_AssemblyName}" // ...
echo "BUILD_NUMBER ${env.BUILD_NUMBER}" // 11
echo "DEFAULT_FILE_SERVER ${params.DEFAULT_FILE_SERVER}" // 11
echo "GIT_BRANCH ${env.GIT_BRANCH}" // origin/master
echo "GIT_COMMIT ${env.GIT_COMMIT}" // 73b814069f2cf0173a62a8228815a9bc9ba93c41
echo "GIT_SERVER ${params.GIT_SERVER}" // ...
echo "GIT_URL ${env.GIT_URL}" // D:\ProgramData\Git\....git
echo "JENKINS_ENVIRONMENT ${env.JENKINS_ENVIRONMENT}" // 11
echo "JENKINS_URL ${env.JENKINS_URL}" // http://localhost:8080/
echo "JOB_NAME ${env.JOB_NAME}" // ...
echo "WORKSPACE ${env.WORKSPACE}" // D:\.jenkins\_\...
}
}
// stage('Restore') {
// steps {
// bat(returnStatus: true, script: 'dotnet --info')
// }
// }
stage('Safe storage of app secrets') {
steps {
dir(_TestProjectDirectory) {
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
'user-secrets init')
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
'user-secrets set "BuildNumber" "' + env.BUILD_NUMBER + '"')
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
'user-secrets set "GitCommitSeven" "' + _GitCommitSeven + '"')
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
'user-secrets set "Server" "' + params.DEFAULT_FILE_SERVER + '"')
}
}
}
stage('Core Build') {
steps {
echo "Build number is ${currentBuild.number}"
dir(_TestProjectDirectory) {
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
'build --runtime win-x64 --self-contained --verbosity quiet')
}
}
}
// stage('Test') {
// options {
// timeout(time: 10, unit: 'MINUTES')
// }
// steps {
// dir(_TestProjectDirectory) {
// bat('dotnet --info')
// }
// }
// }
stage('Framework Build') {
steps {
echo "Build number is ${currentBuild.number}"
bat(returnStatus: true, script: '"' + _ProgramFilesMSBuild + '" ' +
'/target:Restore ' +
'/detailedsummary ' +
'/consoleloggerparameters:PerformanceSummary;ErrorsOnly; ' +
'/property:Configuration=Debug;TargetFrameworkVersion=v4.8 ' +
_AssemblyName + '.csproj')
bat(returnStatus: true, script: '"' + _ProgramFilesMSBuild + '" ' +
'/target:Build ' +
'/detailedsummary ' +
'/consoleloggerparameters:PerformanceSummary;ErrorsOnly; ' +
'/property:Configuration=Debug;TargetFrameworkVersion=v4.8 ' +
_AssemblyName + '.csproj')
}
}
stage('Commit Id') {
steps {
dir('bin/Debug') {
writeFile file: "${_AssemblyName}.txt", text: "${env.GIT_COMMIT}-${env.BUILD_NUMBER}-${env.GIT_URL}"
}
}
}
stage('Package') {
steps {
fileOperations([fileZipOperation(folderPath: 'bin/Debug', outputFolderPath: "${_DDriveNet}/${_GitCommitSeven}-${env.BUILD_NUMBER}-${env.JOB_NAME}-Debug")])
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*", renameFiles: false, sourceCaptureExpression: '', targetLocation: "${_DDriveNet}/${_GitCommitSeven}-${env.BUILD_NUMBER}-${env.JOB_NAME}-Debug", targetNameExpression: '')])
}
}
// stage('Force Fail') {
// steps {
// error("Build failed because of this and that..")
// }
// }
stage('Copy Files to: file-share') {
steps {
dir('bin/Debug') {
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.txt", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.dll", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.exe", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.pdb", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
}
}
}
}
post {
always {
dir('bin') {
deleteDir()
}
dir('obj') {
deleteDir()
}
dir(_TestProjectDirectory + '/bin') {
deleteDir()
}
dir(_TestProjectDirectory + '/obj') {
deleteDir()
}
cleanWs()
}
}
}

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.43.4.0")] [assembly: AssemblyVersion("2.52.0.0")]
[assembly: AssemblyFileVersion("2.43.4.0")] [assembly: AssemblyFileVersion("2.52.0.0")]