- add: Unit tests
This commit is contained in:
@@ -112,7 +112,7 @@ public class ConfigurationService
|
||||
return false;
|
||||
}
|
||||
|
||||
public void SetConfigValue<T>(ConVar<T> conVar, T value)
|
||||
public void SetConfigValue<T>(ConVar<T> conVar, T? value)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.IO.Compression;
|
||||
using System.Runtime.InteropServices;
|
||||
using Nebula.Shared.FileApis;
|
||||
using Nebula.Shared.FileApis.Interfaces;
|
||||
using Nebula.Shared.Models;
|
||||
@@ -11,7 +10,7 @@ namespace Nebula.Shared.Services;
|
||||
[ServiceRegister]
|
||||
public class FileService
|
||||
{
|
||||
public static readonly string RootPath = Path.Join(Environment.GetFolderPath(
|
||||
public static string RootPath = Path.Join(Environment.GetFolderPath(
|
||||
Environment.SpecialFolder.ApplicationData), "Datum");
|
||||
|
||||
private readonly ILogger _logger;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Nebula.Shared.Services;
|
||||
[ServiceRegister]
|
||||
public class RestService
|
||||
{
|
||||
private readonly HttpClient _client = new();
|
||||
private readonly HttpClient _client;
|
||||
private readonly ILogger _logger;
|
||||
|
||||
private readonly JsonSerializerOptions _serializerOptions = new()
|
||||
@@ -20,8 +20,9 @@ public class RestService
|
||||
WriteIndented = true
|
||||
};
|
||||
|
||||
public RestService(DebugService debug)
|
||||
public RestService(DebugService debug, HttpClient? client = null)
|
||||
{
|
||||
_client = client ?? new HttpClient();
|
||||
_logger = debug.GetLogger(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user