Newsbot.Cli/Newsbot.Tests/Commands/SetInstanceTest.cs

30 lines
658 B
C#

using jtom38.Newsbot.Domain.Models;
using jtom38.Newsbot.Services;
using jtom38.Newsbot.Services.Config;
using Xunit.Abstractions;
namespace Newsbot.Tests.Commands;
public class SetInstanceTest
{
private readonly ITestOutputHelper _testOutputHelper;
public SetInstanceTest(ITestOutputHelper testOutputHelper)
{
_testOutputHelper = testOutputHelper;
}
[Fact]
public async Task SetInstanceSavesTheUri()
{
var uri = "http://localhost:5001";
try
{
await SetInstanceService.Save(uri);
}
catch(Exception ex)
{
Assert.Fail(ex.Message);
}
}
}