Added test for APIs
This commit is contained in:
@ -10,8 +10,7 @@ public record AppSettings(string BuildNumber,
|
||||
bool IsDevelopment,
|
||||
bool IsStaging,
|
||||
string MonAResource,
|
||||
string MonASite,
|
||||
string URLs)
|
||||
string MonASite)
|
||||
{
|
||||
|
||||
public override string ToString()
|
||||
|
@ -17,7 +17,6 @@ public class AppSettings
|
||||
[Display(Name = "Is Staging"), Required] public bool? IsStaging { get; set; }
|
||||
[Display(Name = "MonA Resource"), Required] public string MonAResource { get; set; }
|
||||
[Display(Name = "MonA Site"), Required] public string MonASite { get; set; }
|
||||
[Display(Name = "URLs"), Required] public string URLs { get; set; }
|
||||
|
||||
#nullable enable
|
||||
|
||||
@ -50,8 +49,6 @@ public class AppSettings
|
||||
throw new NullReferenceException(nameof(MonAResource));
|
||||
if (appSettings.MonASite is null)
|
||||
throw new NullReferenceException(nameof(MonASite));
|
||||
if (appSettings.URLs is null)
|
||||
throw new NullReferenceException(nameof(URLs));
|
||||
result = new(
|
||||
appSettings.BuildNumber,
|
||||
appSettings.Company,
|
||||
@ -61,8 +58,7 @@ public class AppSettings
|
||||
appSettings.IsDevelopment.Value,
|
||||
appSettings.IsStaging.Value,
|
||||
appSettings.MonAResource,
|
||||
appSettings.MonASite,
|
||||
appSettings.URLs);
|
||||
appSettings.MonASite);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user