diff --git a/Server/Data/Tests/GetPinnedTableApi.json b/Server/Data/Tests/GetPinnedTableApi.json
new file mode 100644
index 0000000..5a54c25
--- /dev/null
+++ b/Server/Data/Tests/GetPinnedTableApi.json
@@ -0,0 +1,6 @@
+{
+ {
+ "Results": [],
+ "TotalRows": 0
+ }
+}
\ No newline at end of file
diff --git a/Server/OI.Metrology.Server.csproj b/Server/OI.Metrology.Server.csproj
index 2200ae3..eff4565 100644
--- a/Server/OI.Metrology.Server.csproj
+++ b/Server/OI.Metrology.Server.csproj
@@ -97,6 +97,9 @@
Always
+
+ Always
+
Always
diff --git a/Server/appsettings.Development.json b/Server/appsettings.Development.json
index d278535..627f029 100644
--- a/Server/appsettings.Development.json
+++ b/Server/appsettings.Development.json
@@ -1,8 +1,10 @@
{
"xApiUrl": "http://messa010ec.ec.local:50301/api",
"ApiUrl": "http://localhost:5126/api",
- "ConnectionString": "Data Source=messv01ec.ec.local\\PROD1,53959;Integrated Security=True;Initial Catalog=Metrology;",
- "xConnectionString": "Data Source=MESSAD1001\\TEST1,59583;Integrated Security=True;Initial Catalog=Metrology;",
+ "xxxApiUrl": "http://localhost:50301/api",
+ "xxxxApiUrl": "http://messa010ec.ec.local:50301/api",
+ "ConnectionString": "Data Source=MESSAD1001\\TEST1,59583;Integrated Security=True;Initial Catalog=Metrology;",
+ "xConnectionString": "Data Source=messv01ec.ec.local\\PROD1,53959;Integrated Security=True;Initial Catalog=Metrology;",
"IsDevelopment": true,
"xMockRoot": "/Data/Tests",
"MockRoot": "",
diff --git a/Tests/UnitTestPinController.cs b/Tests/UnitTestPinController.cs
index 0ab8879..32d0d17 100644
--- a/Tests/UnitTestPinController.cs
+++ b/Tests/UnitTestPinController.cs
@@ -37,7 +37,7 @@ public class UnitTestPinController
}
[TestMethod]
- public void GetHeaderTitles()
+ public void GetPinnedTable()
{
_Logger.Information("Starting Web Application");
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
@@ -45,20 +45,18 @@ public class UnitTestPinController
IPinRepository pinRepository = serviceProvider.GetRequiredService();
Result result = pinRepository.GetPinnedTable(metrologyRepository, id: 1, cde_id: null, biorad_id: null, rds: null);
Assert.IsNotNull(result?.Results);
- Assert.IsTrue(result.Results.Any());
_Logger.Information($"{_TestContext?.TestName} completed");
}
[TestMethod]
- public async Task GetHeaderTitlesApi()
+ public async Task GetPinnedTableApi()
{
HttpClient httpClient = _WebApplicationFactory.CreateClient();
_Logger.Information("Starting Web Application");
- string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/-1/headertitles");
- File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(GetHeaderTitlesApi)}.json"), json);
+ string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/-1/pinned");
+ File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(GetPinnedTableApi)}.json"), json);
Result? result = System.Text.Json.JsonSerializer.Deserialize>(json);
Assert.IsNotNull(result?.Results);
- Assert.IsTrue(result.Results.Any());
_Logger.Information($"{_TestContext?.TestName} completed");
}
diff --git a/azure-pipelines-server-development.yml b/azure-pipelines-server-development.yml
index 45eb7dd..920ab21 100644
--- a/azure-pipelines-server-development.yml
+++ b/azure-pipelines-server-development.yml
@@ -76,11 +76,15 @@ steps:
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
workingDirectory: Server
displayName: "Core Build - Server"
+
+ - powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
+ workingDirectory: "$(System.DefaultWorkingDirectory)/.vscode"
+ displayName: 'PowerShell Script'
- script: "dotnet test --configuration $(Configuration)"
workingDirectory: Tests
displayName: "Core Test"
- enabled: false
+ # enabled: false
- script: '"C:\program files\dotnet\dotnet.exe" tool restore'
workingDirectory: Server
@@ -92,6 +96,22 @@ steps:
displayName: "Report Generator"
enabled: false
+ - task: PublishTestResults@2
+ displayName: "Publish Test Results **/*.trx"
+ inputs:
+ testResultsFormat: VSTest
+ testResultsFiles: "**/*.trx"
+ searchFolder: "$(System.DefaultWorkingDirectory)/.vscode"
+
+ - task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
+ displayName: "Create work item"
+ inputs:
+ teamProject: "Mesa_FI"
+ workItemType: Bug
+ title: $(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)
+ assignedTo: "$(Build.RequestedForId)"
+ enabled: false
+
- script: '"C:\program files\dotnet\dotnet.exe" publish --configuration $(Configuration) --runtime win-x64 --self-contained -o $(Build.ArtifactStagingDirectory)\Server --source $(NugetSource)'
workingDirectory: Server
displayName: "Core Publish"