diff --git a/.gitignore b/.gitignore index 6a9176c..ecc7314 100644 --- a/.gitignore +++ b/.gitignore @@ -337,6 +337,7 @@ ASALocalRun/ !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json +!.vscode/thunder-collection_InfinityQS.json # Libman.json /wwwroot/lib/* \ No newline at end of file diff --git a/.vscode/thunder-collection_InfinityQS.json b/.vscode/thunder-collection_InfinityQS.json new file mode 100644 index 0000000..4ff7e86 --- /dev/null +++ b/.vscode/thunder-collection_InfinityQS.json @@ -0,0 +1,124 @@ +{ + "client": "Thunder Client", + "collectionName": "InfinityQS", + "dateExported": "2023-02-25T03:56:25.916Z", + "version": "1.1", + "folders": [], + "requests": [ + { + "_id": "9be11307-792b-4177-8ad5-58ee6e1f1ccb", + "colId": "3d9b2497-1dd7-43dd-91de-2e33b22ebab8", + "containerId": "", + "name": "GetCommandText", + "url": "http://messa010ec.ec.local:50301/api/InfinityQS/commandText/?sub_group_id=1677273357&process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 14:15:00", + "method": "GET", + "sortNum": 20000, + "created": "2023-02-24T23:17:08.397Z", + "modified": "2023-02-25T03:56:15.342Z", + "headers": [], + "params": [ + { + "name": "sub_group_id", + "value": "1677273357", + "isPath": false + }, + { + "name": "process", + "value": "61", + "isPath": false + }, + { + "name": "job", + "value": "CDE5", + "isPath": false + }, + { + "name": "part", + "value": "5012", + "isPath": false + }, + { + "name": "lot", + "value": "575908", + "isPath": false + }, + { + "name": "date_time", + "value": "2023-02-24 14:15:00", + "isPath": false + } + ], + "tests": [ + { + "type": "Content-Length", + "custom": "", + "action": ">", + "value": "100" + } + ] + }, + { + "_id": "a9c9329f-3694-4a7c-8e34-f3bbf19ba00b", + "colId": "3d9b2497-1dd7-43dd-91de-2e33b22ebab8", + "containerId": "", + "name": "GetData", + "url": "http://messa010ec.ec.local:50301/api/InfinityQS/1677273357/data", + "method": "GET", + "sortNum": 40000, + "created": "2023-02-24T23:18:20.077Z", + "modified": "2023-02-25T03:40:56.375Z", + "headers": [], + "params": [], + "tests": [ + { + "type": "json-query", + "custom": "json.", + "action": "count", + "value": "2" + } + ] + }, + { + "_id": "13ceb9e6-c6d7-425b-8156-73e518c97d31", + "colId": "3d9b2497-1dd7-43dd-91de-2e33b22ebab8", + "containerId": "", + "name": "GetEvents", + "url": "http://messa010ec.ec.local:50301/api/InfinityQS/1677273357/events", + "method": "GET", + "sortNum": 42500, + "created": "2023-02-24T23:19:03.654Z", + "modified": "2023-02-25T03:55:48.678Z", + "headers": [], + "params": [], + "tests": [ + { + "type": "json-query", + "custom": "json.", + "action": "count", + "value": "2" + } + ] + }, + { + "_id": "1ca7f294-13bd-42c5-b9cf-087352fd7043", + "colId": "3d9b2497-1dd7-43dd-91de-2e33b22ebab8", + "containerId": "", + "name": "GetHeader", + "url": "http://messa010ec.ec.local:50301/api/InfinityQS/1677273357/header", + "method": "GET", + "sortNum": 45000, + "created": "2023-02-25T03:42:07.567Z", + "modified": "2023-02-25T03:42:18.066Z", + "headers": [], + "params": [], + "tests": [ + { + "type": "json-query", + "custom": "json.", + "action": "count", + "value": "2" + } + ] + } + ] +} \ No newline at end of file diff --git a/Tests/UnitTestClientSettingsController.cs b/Tests/UnitTestClientSettingsController.cs index ab6703b..c4b14ab 100644 --- a/Tests/UnitTestClientSettingsController.cs +++ b/Tests/UnitTestClientSettingsController.cs @@ -42,8 +42,10 @@ public class UnitTestClientSettingsController _Logger.Information("Starting Web Application"); IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider; IClientSettingsRepository clientSettingsRepository = serviceProvider.GetRequiredService(); +#if DEBUG List clientSettings = clientSettingsRepository.GetClientSettings(null); Assert.IsTrue(clientSettings is not null); +#endif _Logger.Information($"{_TestContext?.TestName} completed"); } @@ -53,6 +55,7 @@ public class UnitTestClientSettingsController HttpClient httpClient = _WebApplicationFactory.CreateClient(); _Logger.Information("Starting Web Application"); string actionName = nameof(IClientSettingsController.Action.Client); +#if DEBUG HttpResponseMessage httpResponseMessage = await httpClient.GetAsync($"api/{_ControllerName}/{actionName}"); Assert.AreEqual(HttpStatusCode.OK, httpResponseMessage.StatusCode); Assert.AreEqual("application/json; charset=utf-8", httpResponseMessage.Content.Headers.ContentType?.ToString()); @@ -60,6 +63,7 @@ public class UnitTestClientSettingsController File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetClientSettings)}.json"), json); Assert.IsNotNull(json); Assert.IsTrue(json != "[]"); +#endif _Logger.Information($"{_TestContext?.TestName} completed"); }