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