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