Compare commits

...

3 Commits

Author SHA1 Message Date
23f6e83c8d NonThrowTryCatch 2023-03-24 12:57:35 -07:00
644cde644d Fix-Event II 2023-03-24 09:49:34 -07:00
243c8dd888 nuget bump and userSecrets tasks and
query update for event
2023-03-17 09:52:48 -07:00
21 changed files with 256 additions and 103 deletions

44
.vscode/tasks.json vendored
View File

@ -1,6 +1,50 @@
{ {
"version": "2.0.0", "version": "2.0.0",
"options": {
"env": {
"serverUserSecretsId": "6501aa0f-8499-4be5-96a9-e99b11323eeb"
}
},
"tasks": [ "tasks": [
{
"label": "userSecretsInit",
"command": "dotnet",
"type": "process",
"args": [
"user-secrets",
"-p",
"${workspaceFolder}/Server/OI.Metrology.Server.csproj",
"init"
],
"problemMatcher": "$msCompile"
},
{
"label": "userSecretsSet",
"command": "dotnet",
"type": "process",
"args": [
"user-secrets",
"-p",
"${workspaceFolder}/Server/OI.Metrology.Server.csproj",
"set",
"asdf",
"123"
],
"problemMatcher": "$msCompile"
},
{
"label": "userSecretsMkLink",
"command": "cmd",
"type": "shell",
"args": [
"/c",
"mklink",
"/J",
".vscode\\UserSecrets",
"${userHome}\\AppData\\Roaming\\Microsoft\\UserSecrets\\$env:serverUserSecretsId"
],
"problemMatcher": "$msCompile"
},
{ {
"label": "buildServer", "label": "buildServer",
"command": "dotnet", "command": "dotnet",

View File

@ -30,7 +30,7 @@
<PackageReference Include="Dapper" Version="2.0.123" /> <PackageReference Include="Dapper" Version="2.0.123" />
<PackageReference Include="EntityFramework" Version="6.4.4" /> <PackageReference Include="EntityFramework" Version="6.4.4" />
<PackageReference Include="jQuery" Version="3.6.3" /> <PackageReference Include="jQuery" Version="3.6.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="7.0.0" />

View File

@ -15,7 +15,7 @@ public class PagesController : Controller
public PagesController(AppSettings appSettings, IMetrologyRepository metrologyRepository) public PagesController(AppSettings appSettings, IMetrologyRepository metrologyRepository)
{ {
_AppSettings=appSettings; _AppSettings = appSettings;
_MetrologyRepository = metrologyRepository; _MetrologyRepository = metrologyRepository;
_IsTestDatabase = appSettings.ConnectionString.Contains("test", StringComparison.InvariantCultureIgnoreCase); _IsTestDatabase = appSettings.ConnectionString.Contains("test", StringComparison.InvariantCultureIgnoreCase);
} }

View File

@ -28,14 +28,14 @@
<PackageReference Include="Dapper" Version="2.0.123" /> <PackageReference Include="Dapper" Version="2.0.123" />
<PackageReference Include="EntityFramework" Version="6.4.4" /> <PackageReference Include="EntityFramework" Version="6.4.4" />
<PackageReference Include="jQuery" Version="3.6.3" /> <PackageReference Include="jQuery" Version="3.6.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.3" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.4" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Serilog.AspNetCore.Ingestion" Version="1.0.0-dev-00032" /> <PackageReference Include="Serilog.AspNetCore.Ingestion" Version="1.0.0-dev-00032" />
<PackageReference Include="Serilog.AspNetCore" Version="6.1.0" /> <PackageReference Include="Serilog.AspNetCore" Version="6.1.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" /> <PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />

View File

@ -177,6 +177,39 @@ public class InfinityQSRepository : IInfinityQSRepository
return result; return result;
} }
string IInfinityQSRepository.GetCommandText(InfinityQSBase infinityQSBase)
{
StringBuilder result = new();
if (string.IsNullOrEmpty(infinityQSBase.PR_NAME))
throw new ArgumentException(nameof(infinityQSBase.PR_NAME));
if (string.IsNullOrEmpty(infinityQSBase.PD_NAME))
throw new ArgumentException(nameof(infinityQSBase.PD_NAME));
if (infinityQSBase.SE_SGTM is null)
throw new ArgumentException(nameof(infinityQSBase.SE_SGTM));
_ = result
.AppendLine(" select ")
.AppendLine(" ev.f_evnt [ev_evnt], ")
.AppendLine(" ev.f_sgtm [ev_sgtm], ")
.AppendLine(" dateadd(HH, -7, (dateadd(SS, convert(bigint, ev.f_sgtm), '19700101'))) [ev_utc7], ")
.AppendLine(" pr.f_name [pr_name], ")
.AppendLine(" pd.f_name [pd_name], ")
.AppendLine(" td.f_test [td_test], ")
.AppendLine(" td.f_name [td_name], ")
.AppendLine(" ev.f_name [ev_name] ")
.AppendLine(" from [spcepiworld].[dbo].[evnt_inf] ev ")
.AppendLine(" join [spcepiworld].[dbo].[prcs_dat] pr ")
.AppendLine(" on ev.f_prcs = pr.f_prcs ")
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd ")
.AppendLine(" on ev.f_part = pd.f_part ")
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td ")
.AppendLine(" on ev.f_test = td.f_test ")
.Append(" where pr.f_name = '").Append(infinityQSBase.PR_NAME).AppendLine("' ")
.Append(" and pd.f_name = '").Append(infinityQSBase.PD_NAME).AppendLine("' ")
.Append(" and ev.f_sgtm = ").Append(infinityQSBase.SE_SGTM).AppendLine(" ")
.AppendLine(" for json path ");
return result.ToString();
}
Result<InfinityQSEvent[]> IInfinityQSRepository.GetEvents(string subGroupId) Result<InfinityQSEvent[]> IInfinityQSRepository.GetEvents(string subGroupId)
{ {
Result<InfinityQSEvent[]>? result; Result<InfinityQSEvent[]>? result;
@ -196,7 +229,7 @@ public class InfinityQSRepository : IInfinityQSRepository
results = Array.Empty<InfinityQSEvent>(); results = Array.Empty<InfinityQSEvent>();
else else
{ {
string commandText = $"select * from [spcepiworld].[dbo].[evnt_inf] ev where ev.f_prcs = '{infinityQSBase.PR_NAME}' and ev.f_part = '{infinityQSBase.PD_NAME}' and ev.f_sgtm = {infinityQSBase.SE_SGTM} "; string commandText = infinityQSRepository.GetCommandText(infinityQSBase);
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText); StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText);
results = JsonSerializer.Deserialize<InfinityQSEvent[]>(stringBuilder.ToString(), new JsonSerializerOptions { PropertyNameCaseInsensitive = true }); results = JsonSerializer.Deserialize<InfinityQSEvent[]>(stringBuilder.ToString(), new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
if (results is null) if (results is null)

View File

@ -26,7 +26,7 @@ public class InfinityQSV2Repository : IInfinityQSV2Repository
{ {
StringBuilder result = new(); StringBuilder result = new();
if (string.IsNullOrEmpty(subGroupId)) if (string.IsNullOrEmpty(subGroupId))
throw new ArgumentException(nameof(subGroupId)); throw new ArgumentException(null, nameof(subGroupId));
_ = result _ = result
.AppendLine(" select ") .AppendLine(" select ")
.AppendLine(" sd.f_sgrp sd_sgrp, ") .AppendLine(" sd.f_sgrp sd_sgrp, ")
@ -50,7 +50,7 @@ public class InfinityQSV2Repository : IInfinityQSV2Repository
StringBuilder result = new(); StringBuilder result = new();
const string dateTimeFormat = "yyyy-MM-dd HH:mm:ss"; const string dateTimeFormat = "yyyy-MM-dd HH:mm:ss";
if (!string.IsNullOrEmpty(dateTime) && (dateTime.Contains('-') || dateTime.Contains(' ') || dateTime.Contains(':')) && dateTime.Length != dateTimeFormat.Length) if (!string.IsNullOrEmpty(dateTime) && (dateTime.Contains('-') || dateTime.Contains(' ') || dateTime.Contains(':')) && dateTime.Length != dateTimeFormat.Length)
throw new ArgumentException(nameof(dateTime)); throw new ArgumentException(null, nameof(dateTime));
_ = result _ = result
.AppendLine(" select ") .AppendLine(" select ")
.AppendLine(" se.f_sgrp se_sgrp, ") .AppendLine(" se.f_sgrp se_sgrp, ")
@ -180,6 +180,39 @@ public class InfinityQSV2Repository : IInfinityQSV2Repository
return result; return result;
} }
string IInfinityQSV2Repository.GetCommandText(InfinityQSBaseV2 infinityQSBase)
{
StringBuilder result = new();
if (string.IsNullOrEmpty(infinityQSBase.Process))
throw new ArgumentException(nameof(infinityQSBase.Process));
if (string.IsNullOrEmpty(infinityQSBase.Part))
throw new ArgumentException(nameof(infinityQSBase.Part));
if (infinityQSBase.SubGroupDateTime is null)
throw new ArgumentException(nameof(infinityQSBase.SubGroupDateTime));
_ = result
.AppendLine(" select ")
.AppendLine(" ev.f_evnt [ev_evnt], ")
.AppendLine(" ev.f_sgtm [ev_sgtm], ")
.AppendLine(" dateadd(HH, -7, (dateadd(SS, convert(bigint, ev.f_sgtm), '19700101'))) [ev_utc7], ")
.AppendLine(" pr.f_name [pr_name], ")
.AppendLine(" pd.f_name [pd_name], ")
.AppendLine(" td.f_test [td_test], ")
.AppendLine(" td.f_name [td_name], ")
.AppendLine(" ev.f_name [ev_name] ")
.AppendLine(" from [spcepiworld].[dbo].[evnt_inf] ev ")
.AppendLine(" join [spcepiworld].[dbo].[prcs_dat] pr ")
.AppendLine(" on ev.f_prcs = pr.f_prcs ")
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd ")
.AppendLine(" on ev.f_part = pd.f_part ")
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td ")
.AppendLine(" on ev.f_test = td.f_test ")
.Append(" where pr.f_name = '").Append(infinityQSBase.Process).AppendLine("' ")
.Append(" and pd.f_name = '").Append(infinityQSBase.Part).AppendLine("' ")
.Append(" and ev.f_sgtm = ").Append(infinityQSBase.SubGroupDateTime).AppendLine(" ")
.AppendLine(" for json path ");
return result.ToString();
}
Result<InfinityQSEventV2[]> IInfinityQSV2Repository.GetEvents(string subGroupId) Result<InfinityQSEventV2[]> IInfinityQSV2Repository.GetEvents(string subGroupId)
{ {
Result<InfinityQSEventV2[]>? result; Result<InfinityQSEventV2[]>? result;
@ -199,7 +232,7 @@ public class InfinityQSV2Repository : IInfinityQSV2Repository
collection = Array.Empty<InfinityQSEvent>(); collection = Array.Empty<InfinityQSEvent>();
else else
{ {
string commandText = $"select * from [spcepiworld].[dbo].[evnt_inf] ev where ev.f_prcs = '{infinityQSBase.Process}' and ev.f_part = '{infinityQSBase.Part}' and ev.f_sgtm = {infinityQSBase.SubGroupDateTime} "; string commandText = infinityQSV2Repository.GetCommandText(infinityQSBase);
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText); StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText);
collection = JsonSerializer.Deserialize<InfinityQSEvent[]>(stringBuilder.ToString(), new JsonSerializerOptions { PropertyNameCaseInsensitive = true }); collection = JsonSerializer.Deserialize<InfinityQSEvent[]>(stringBuilder.ToString(), new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
if (collection is null) if (collection is null)

View File

@ -1,27 +1,13 @@
namespace OI.Metrology.Shared.DataModels; namespace OI.Metrology.Shared.DataModels;
public record InfinityQSEvent(int F_EVNT, public record InfinityQSEvent(int EV_EVNT,
int F_CRTM, int EV_SGTM,
int F_EDTM, string EV_UTC7,
int F_TYPE, string PR_NAME,
string F_NAME, string PD_NAME,
int F_EMPL, int TD_TEST,
int F_EVTM, string TD_NAME,
int F_PRCS, string EV_NAME)
int F_PART,
int F_TEST,
int F_SGTM,
int F_ACC,
int F_ACEM,
int F_ACTM,
int F_CAC,
int F_CAEM,
int F_CATM,
int F_FLAG,
int F_USER,
int F_DSBL,
int F_RFC,
int F_TRTM)
{ {
public static InfinityQSEventV2[] Convert(InfinityQSEvent[] collection) public static InfinityQSEventV2[] Convert(InfinityQSEvent[] collection)
@ -34,53 +20,25 @@ public record InfinityQSEvent(int F_EVNT,
public static InfinityQSEventV2 Map(InfinityQSEvent item) public static InfinityQSEventV2 Map(InfinityQSEvent item)
{ {
InfinityQSEventV2 result = new(item.F_EVNT, InfinityQSEventV2 result = new(item.EV_EVNT,
item.F_CRTM, item.EV_SGTM,
item.F_EDTM, item.EV_UTC7,
item.F_TYPE, item.PR_NAME,
item.F_NAME, item.PD_NAME,
item.F_EMPL, item.TD_TEST,
item.F_EVTM, item.TD_NAME,
item.F_PRCS, item.EV_NAME);
item.F_PART,
item.F_TEST,
item.F_SGTM,
item.F_ACC,
item.F_ACEM,
item.F_ACTM,
item.F_CAC,
item.F_CAEM,
item.F_CATM,
item.F_FLAG,
item.F_USER,
item.F_DSBL,
item.F_RFC,
item.F_TRTM);
return result; return result;
} }
} }
public record InfinityQSEventV2(int Evnt, public record InfinityQSEventV2(int EventId,
int Crtm, int SubGroupDateTimeId,
int Edtm, string SubGroupDateTime,
int Type, string Process,
string Name, string Part,
int Empl, int VariableNumber,
int Evtm, string Variable,
int Prcs, string Name)
int Part,
int Test,
int Sgtm,
int Acc,
int Acem,
int Actm,
int Cac,
int Caem,
int Catm,
int Flag,
int User,
int Dsbl,
int Rfc,
int Trtm)
{ } { }

View File

@ -24,7 +24,7 @@ public class Pinned : HeaderCommon
ToolTypeName = headerCommon.ToolTypeName; ToolTypeName = headerCommon.ToolTypeName;
MesEntity = headerCommon.MesEntity; MesEntity = headerCommon.MesEntity;
Employee = headerCommon.Employee; Employee = headerCommon.Employee;
Layer = headerCommon.Layer; Layer = headerCommon.Layer;
PSN = headerCommon.PSN; PSN = headerCommon.PSN;

View File

@ -6,6 +6,7 @@ public interface IInfinityQSRepository
{ {
string GetCommandText(string subGroupId); string GetCommandText(string subGroupId);
string GetCommandText(InfinityQSBase infinityQSBase);
string GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime); string GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime);
Result<InfinityQSBase[]> GetData(string subGroupId); Result<InfinityQSBase[]> GetData(string subGroupId);
Result<InfinityQSDescriptor[]> GetDescriptors(string subGroupId); Result<InfinityQSDescriptor[]> GetDescriptors(string subGroupId);

View File

@ -6,6 +6,7 @@ public interface IInfinityQSV2Repository
{ {
string GetCommandText(string subGroupId); string GetCommandText(string subGroupId);
string GetCommandText(InfinityQSBaseV2 infinityQSBase);
string GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime); string GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime);
Result<InfinityQSBaseV2[]> GetData(string subGroupId); Result<InfinityQSBaseV2[]> GetData(string subGroupId);
Result<InfinityQSDescriptorV2[]> GetDescriptors(string subGroupId); Result<InfinityQSDescriptorV2[]> GetDescriptors(string subGroupId);

View File

@ -31,7 +31,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="System.Text.Json" Version="7.0.2" /> <PackageReference Include="System.Text.Json" Version="7.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -32,7 +32,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.3" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" /> <PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" /> <PackageReference Include="MSTest.TestFramework" Version="3.0.2" />

View File

@ -54,7 +54,7 @@ public class UnitAwaitingDispoController
public async Task IndexApi() public async Task IndexApi()
{ {
HttpClient httpClient = _WebApplicationFactory.CreateClient(); HttpClient httpClient = _WebApplicationFactory.CreateClient();
_Logger.Information("Starting Web Application"); _Logger.Information("Starting Web Application");
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}"); string? json = await httpClient.GetStringAsync($"api/{_ControllerName}");
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(IMetrologyRepository.GetAwaitingDisposition)}Api.json"), json); File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(IMetrologyRepository.GetAwaitingDisposition)}Api.json"), json);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");

View File

@ -29,12 +29,20 @@ public class UnitTestAppSettingsController
_ControllerName = nameof(Server.ApiControllers.AppSettingsController)[..^10]; _ControllerName = nameof(Server.ApiControllers.AppSettingsController)[..^10];
} }
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
[TestMethod] [TestMethod]
public void TestControllerName() public void TestControllerName()
{ {
_Logger.Information("Starting Web Application"); _Logger.Information("Starting Web Application");
Assert.AreEqual(IAppSettingsController<object>.GetRouteName(), _ControllerName); Assert.AreEqual(IAppSettingsController<object>.GetRouteName(), _ControllerName);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
[TestMethod] [TestMethod]
@ -45,6 +53,7 @@ public class UnitTestAppSettingsController
IAppSettingsRepository<Server.Models.Binder.AppSettings> appSettingsRepository = serviceProvider.GetRequiredService<IAppSettingsRepository<Server.Models.Binder.AppSettings>>(); IAppSettingsRepository<Server.Models.Binder.AppSettings> appSettingsRepository = serviceProvider.GetRequiredService<IAppSettingsRepository<Server.Models.Binder.AppSettings>>();
appSettingsRepository.VerifyConnectionStrings(); appSettingsRepository.VerifyConnectionStrings();
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
[TestMethod] [TestMethod]
@ -55,6 +64,7 @@ public class UnitTestAppSettingsController
AppSettings appSettings = serviceProvider.GetRequiredService<AppSettings>(); AppSettings appSettings = serviceProvider.GetRequiredService<AppSettings>();
Assert.IsNotNull(appSettings); Assert.IsNotNull(appSettings);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
[TestMethod] [TestMethod]
@ -66,6 +76,7 @@ public class UnitTestAppSettingsController
Server.Models.Binder.AppSettings appSettings = appSettingsRepository.GetAppSettings(); Server.Models.Binder.AppSettings appSettings = appSettingsRepository.GetAppSettings();
Assert.IsTrue(appSettings is not null); Assert.IsTrue(appSettings is not null);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
[TestMethod] [TestMethod]
@ -82,6 +93,7 @@ public class UnitTestAppSettingsController
Assert.IsNotNull(json); Assert.IsNotNull(json);
Assert.IsTrue(json != "[]"); Assert.IsTrue(json != "[]");
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
[TestMethod] [TestMethod]
@ -93,6 +105,7 @@ public class UnitTestAppSettingsController
string result = appSettingsRepository.GetBuildNumberAndGitCommitSeven(); string result = appSettingsRepository.GetBuildNumberAndGitCommitSeven();
Assert.IsTrue(result is not null); Assert.IsTrue(result is not null);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
[TestMethod] [TestMethod]
@ -108,6 +121,7 @@ public class UnitTestAppSettingsController
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetBuildNumberAndGitCommitSeven)}.json"), json); File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetBuildNumberAndGitCommitSeven)}.json"), json);
Assert.IsNotNull(json); Assert.IsNotNull(json);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
} }

View File

@ -54,8 +54,8 @@ public class UnitTestClientSettingsController
{ {
HttpClient httpClient = _WebApplicationFactory.CreateClient(); HttpClient httpClient = _WebApplicationFactory.CreateClient();
_Logger.Information("Starting Web Application"); _Logger.Information("Starting Web Application");
string actionName = nameof(IClientSettingsController<object>.Action.Client);
#if DEBUG #if DEBUG
string actionName = nameof(IClientSettingsController<object>.Action.Client);
HttpResponseMessage httpResponseMessage = await httpClient.GetAsync($"api/{_ControllerName}/{actionName}"); HttpResponseMessage httpResponseMessage = await httpClient.GetAsync($"api/{_ControllerName}/{actionName}");
Assert.AreEqual(HttpStatusCode.OK, httpResponseMessage.StatusCode); Assert.AreEqual(HttpStatusCode.OK, httpResponseMessage.StatusCode);
Assert.AreEqual("application/json; charset=utf-8", httpResponseMessage.Content.Headers.ContentType?.ToString()); Assert.AreEqual("application/json; charset=utf-8", httpResponseMessage.Content.Headers.ContentType?.ToString());

View File

@ -29,12 +29,20 @@ public class UnitTestExportController
_ControllerName = nameof(Server.ApiControllers.ExportController)[..^10]; _ControllerName = nameof(Server.ApiControllers.ExportController)[..^10];
} }
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
[TestMethod] [TestMethod]
public void TestControllerName() public void TestControllerName()
{ {
_Logger.Information("Starting Web Application"); _Logger.Information("Starting Web Application");
Assert.AreEqual(IExportController<string>.GetRouteName(), _ControllerName); Assert.AreEqual(IExportController<string>.GetRouteName(), _ControllerName);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
private static HeaderCommon GetHeaderCommon() => private static HeaderCommon GetHeaderCommon() =>
@ -52,6 +60,7 @@ public class UnitTestExportController
string result = exportRepository.GetExport(GetHeaderCommon()); string result = exportRepository.GetExport(GetHeaderCommon());
Assert.IsNotNull(result); Assert.IsNotNull(result);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
[TestMethod] [TestMethod]
@ -63,6 +72,7 @@ public class UnitTestExportController
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetExport)}.txt"), result); File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetExport)}.txt"), result);
Assert.IsNotNull(result); Assert.IsNotNull(result);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
[TestMethod] [TestMethod]
@ -73,6 +83,7 @@ public class UnitTestExportController
HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/export", GetStringContent()); HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/export", GetStringContent());
Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK); Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
[TestMethod] [TestMethod]
@ -84,6 +95,7 @@ public class UnitTestExportController
Result<HeaderCommon[]> result = exportRepository.GetHeaders(GetHeaderCommon()); Result<HeaderCommon[]> result = exportRepository.GetHeaders(GetHeaderCommon());
Assert.IsNotNull(result?.Results); Assert.IsNotNull(result?.Results);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
[TestMethod] [TestMethod]
@ -96,6 +108,7 @@ public class UnitTestExportController
Result<HeaderCommon[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<HeaderCommon[]>>(json); Result<HeaderCommon[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<HeaderCommon[]>>(json);
Assert.IsNotNull(result?.Results); Assert.IsNotNull(result?.Results);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
[TestMethod] [TestMethod]
@ -106,6 +119,7 @@ public class UnitTestExportController
HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/headers", GetStringContent()); HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/headers", GetStringContent());
Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK); Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
[TestMethod] [TestMethod]
@ -117,6 +131,7 @@ public class UnitTestExportController
Result<HeaderCommon[]> result = exportRepository.GetLogistics(GetHeaderCommon()); Result<HeaderCommon[]> result = exportRepository.GetLogistics(GetHeaderCommon());
Assert.IsNotNull(result?.Results); Assert.IsNotNull(result?.Results);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
[TestMethod] [TestMethod]
@ -129,6 +144,7 @@ public class UnitTestExportController
Result<HeaderCommon[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<HeaderCommon[]>>(json); Result<HeaderCommon[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<HeaderCommon[]>>(json);
Assert.IsNotNull(result?.Results); Assert.IsNotNull(result?.Results);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
[TestMethod] [TestMethod]
@ -139,6 +155,7 @@ public class UnitTestExportController
HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/logistics", GetStringContent()); HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/logistics", GetStringContent());
Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK); Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
[TestMethod] [TestMethod]
@ -150,6 +167,7 @@ public class UnitTestExportController
string result = exportRepository.GetProcessDataStandardFormat(GetHeaderCommon()); string result = exportRepository.GetProcessDataStandardFormat(GetHeaderCommon());
Assert.IsNotNull(result); Assert.IsNotNull(result);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
[TestMethod] [TestMethod]
@ -161,6 +179,7 @@ public class UnitTestExportController
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetProcessDataStandardFormat)}.pdsf"), result); File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetProcessDataStandardFormat)}.pdsf"), result);
Assert.IsNotNull(result); Assert.IsNotNull(result);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
[TestMethod] [TestMethod]
@ -171,6 +190,7 @@ public class UnitTestExportController
HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/processDataStandardFormat", GetStringContent()); HttpResponseMessage httpResponseMessage = await httpClient.PostAsync($"api/{_ControllerName}/processDataStandardFormat", GetStringContent());
Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK); Assert.IsTrue(httpResponseMessage.StatusCode == System.Net.HttpStatusCode.OK);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
} }

View File

@ -28,15 +28,23 @@ public class UnitTestInfinityQSController
_ControllerName = nameof(Server.ApiControllers.InfinityQSController)[..^10]; _ControllerName = nameof(Server.ApiControllers.InfinityQSController)[..^10];
} }
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
[TestMethod] [TestMethod]
public void TestControllerName() public void TestControllerName()
{ {
_Logger.Information("Starting Web Application"); _Logger.Information("Starting Web Application");
Assert.AreEqual(IInfinityQSController<string>.GetRouteName(), _ControllerName); Assert.AreEqual(IInfinityQSController<string>.GetRouteName(), _ControllerName);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -48,9 +56,10 @@ public class UnitTestInfinityQSController
string result = infinityQSRepository.GetCommandText("1677273357", "61", "CDE5", "5012", "575908", ""); string result = infinityQSRepository.GetCommandText("1677273357", "61", "CDE5", "5012", "575908", "");
Assert.IsNotNull(result); Assert.IsNotNull(result);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -62,9 +71,10 @@ public class UnitTestInfinityQSController
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetCommandText)}.sql"), json); File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetCommandText)}.sql"), json);
Assert.IsNotNull(json); Assert.IsNotNull(json);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -82,9 +92,10 @@ public class UnitTestInfinityQSController
Assert.IsNotNull(result?.Results[0].TD_NAME); Assert.IsNotNull(result?.Results[0].TD_NAME);
Assert.IsNotNull(result?.Results[0].TD_TEST); Assert.IsNotNull(result?.Results[0].TD_TEST);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -98,9 +109,10 @@ public class UnitTestInfinityQSController
Result<InfinityQSBase[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBase[]>>(json); Result<InfinityQSBase[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBase[]>>(json);
Assert.IsNotNull(result?.Results); Assert.IsNotNull(result?.Results);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -115,9 +127,10 @@ public class UnitTestInfinityQSController
Assert.IsNotNull(result?.Results[0].SD_SGRP); Assert.IsNotNull(result?.Results[0].SD_SGRP);
Assert.IsNotNull(result?.Results[0].SD_TSNO); Assert.IsNotNull(result?.Results[0].SD_TSNO);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -131,9 +144,10 @@ public class UnitTestInfinityQSController
Result<InfinityQSDescriptor[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSDescriptor[]>>(json); Result<InfinityQSDescriptor[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSDescriptor[]>>(json);
Assert.IsNotNull(result?.Results); Assert.IsNotNull(result?.Results);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -145,9 +159,10 @@ public class UnitTestInfinityQSController
Result<InfinityQSEvent[]> result = infinityQSRepository.GetEvents("1677273357"); Result<InfinityQSEvent[]> result = infinityQSRepository.GetEvents("1677273357");
Assert.IsNotNull(result?.Results); Assert.IsNotNull(result?.Results);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -160,9 +175,10 @@ public class UnitTestInfinityQSController
Result<InfinityQSEvent[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSEvent[]>>(json); Result<InfinityQSEvent[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSEvent[]>>(json);
Assert.IsNotNull(result?.Results); Assert.IsNotNull(result?.Results);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -174,9 +190,10 @@ public class UnitTestInfinityQSController
Result<InfinityQSBase[]> result = infinityQSRepository.GetHeader("1677273357"); Result<InfinityQSBase[]> result = infinityQSRepository.GetHeader("1677273357");
Assert.IsNotNull(result?.Results); Assert.IsNotNull(result?.Results);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -189,6 +206,7 @@ public class UnitTestInfinityQSController
Result<InfinityQSBase[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBase[]>>(json); Result<InfinityQSBase[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBase[]>>(json);
Assert.IsNotNull(result?.Results); Assert.IsNotNull(result?.Results);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
} }

View File

@ -28,17 +28,22 @@ public class UnitTestInfinityQSV2Controller
_ControllerName = nameof(Server.ApiControllers.InfinityQSV2Controller)[..^10]; _ControllerName = nameof(Server.ApiControllers.InfinityQSV2Controller)[..^10];
} }
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
[TestMethod] [TestMethod]
public void TestControllerName() public void TestControllerName()
{ {
_Logger.Information("Starting Web Application"); _Logger.Information("Starting Web Application");
Assert.AreEqual(IInfinityQSV2Controller<string>.GetRouteName(), _ControllerName); Assert.AreEqual(IInfinityQSV2Controller<string>.GetRouteName(), _ControllerName);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true
[Ignore]
#endif
[TestMethod] [TestMethod]
public void GetCommandText() public void GetCommandText()
{ {
@ -48,9 +53,10 @@ public class UnitTestInfinityQSV2Controller
string result = infinityQSV2Repository.GetCommandText("1677273357", "61", "CDE5", "5012", "575908", ""); string result = infinityQSV2Repository.GetCommandText("1677273357", "61", "CDE5", "5012", "575908", "");
Assert.IsNotNull(result); Assert.IsNotNull(result);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -62,9 +68,10 @@ public class UnitTestInfinityQSV2Controller
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetCommandText)}.sql"), json); File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetCommandText)}.sql"), json);
Assert.IsNotNull(json); Assert.IsNotNull(json);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -82,9 +89,10 @@ public class UnitTestInfinityQSV2Controller
Assert.IsNotNull(result?.Results[0].VariableNumber); Assert.IsNotNull(result?.Results[0].VariableNumber);
Assert.IsNotNull(result?.Results[0].SubGroupDateTime); Assert.IsNotNull(result?.Results[0].SubGroupDateTime);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -98,9 +106,10 @@ public class UnitTestInfinityQSV2Controller
Result<InfinityQSBaseV2[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBaseV2[]>>(json); Result<InfinityQSBaseV2[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBaseV2[]>>(json);
Assert.IsNotNull(result?.Results); Assert.IsNotNull(result?.Results);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -115,9 +124,10 @@ public class UnitTestInfinityQSV2Controller
Assert.IsNotNull(result?.Results[0].SubGroupId); Assert.IsNotNull(result?.Results[0].SubGroupId);
Assert.IsNotNull(result?.Results[0].SiteNumber); Assert.IsNotNull(result?.Results[0].SiteNumber);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -131,9 +141,10 @@ public class UnitTestInfinityQSV2Controller
Result<InfinityQSDescriptorV2[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSDescriptorV2[]>>(json); Result<InfinityQSDescriptorV2[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSDescriptorV2[]>>(json);
Assert.IsNotNull(result?.Results); Assert.IsNotNull(result?.Results);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -145,9 +156,10 @@ public class UnitTestInfinityQSV2Controller
Result<InfinityQSEventV2[]> result = infinityQSV2Repository.GetEvents("1677273357"); Result<InfinityQSEventV2[]> result = infinityQSV2Repository.GetEvents("1677273357");
Assert.IsNotNull(result?.Results); Assert.IsNotNull(result?.Results);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -160,9 +172,10 @@ public class UnitTestInfinityQSV2Controller
Result<InfinityQSEvent[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSEvent[]>>(json); Result<InfinityQSEvent[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSEvent[]>>(json);
Assert.IsNotNull(result?.Results); Assert.IsNotNull(result?.Results);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -174,9 +187,10 @@ public class UnitTestInfinityQSV2Controller
Result<InfinityQSBaseV2[]> result = infinityQSV2Repository.GetHeader("1677273357"); Result<InfinityQSBaseV2[]> result = infinityQSV2Repository.GetHeader("1677273357");
Assert.IsNotNull(result?.Results); Assert.IsNotNull(result?.Results);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
#if true #if !DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
@ -189,6 +203,7 @@ public class UnitTestInfinityQSV2Controller
Result<InfinityQSBaseV2[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBaseV2[]>>(json); Result<InfinityQSBaseV2[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBaseV2[]>>(json);
Assert.IsNotNull(result?.Results); Assert.IsNotNull(result?.Results);
_Logger.Information($"{_TestContext?.TestName} completed"); _Logger.Information($"{_TestContext?.TestName} completed");
NonThrowTryCatch();
} }
} }

View File

@ -9,13 +9,13 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="MudBlazor" Version="6.1.9" /> <PackageReference Include="MudBlazor" Version="6.1.9" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.3" /> <PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.4" />
<PackageReference Include="IgniteUI.Blazor" Version="22.2.24" /> <PackageReference Include="IgniteUI.Blazor" Version="22.2.24" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Serilog.Sinks.BrowserConsole" Version="1.0.0" /> <PackageReference Include="Serilog.Sinks.BrowserConsole" Version="1.0.0" />
<PackageReference Include="Serilog.Sinks.BrowserHttp" Version="1.0.0-dev-00032" /> <PackageReference Include="Serilog.Sinks.BrowserHttp" Version="1.0.0-dev-00032" />
<PackageReference Include="System.Net.Http.Json" Version="7.0.0" /> <PackageReference Include="System.Net.Http.Json" Version="7.0.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Shared\OI.Metrology.Shared.csproj" /> <ProjectReference Include="..\Shared\OI.Metrology.Shared.csproj" />

View File

@ -132,6 +132,14 @@ steps:
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)" testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/.vscode" searchFolder: "$(System.DefaultWorkingDirectory)/.vscode"
- task: PublishTestResults@2
displayName: "Publish Test Results **/coverage.cobertura.xml"
inputs:
testResultsFormat: VSTest
testResultsFiles: "**/coverage.cobertura.xml"
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/.vscode"
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1 - task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
displayName: "Create work item" displayName: "Create work item"
inputs: inputs:

View File

@ -110,6 +110,14 @@ steps:
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)" testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/.vscode" searchFolder: "$(System.DefaultWorkingDirectory)/.vscode"
- task: PublishTestResults@2
displayName: "Publish Test Results **/coverage.cobertura.xml"
inputs:
testResultsFormat: VSTest
testResultsFiles: "**/coverage.cobertura.xml"
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/.vscode"
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1 - task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
displayName: "Create work item" displayName: "Create work item"
inputs: inputs: