Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/recyclarr/blame/commit/55daad8db1b9c533a303fb6cc3596bfd877ba3be/tests/Recyclarr.Tests/Common/ResourceDataReaderTest.cs You should set ROOT_URL correctly, otherwise the web may not work correctly.
recyclarr/tests/Recyclarr.Tests/Common/ResourceDataReaderTest.cs

35 lines
957 B

using Recyclarr.Common;
namespace Recyclarr.Tests.Common;
[TestFixture]
public class ResourceDataReaderTest
{
[Test]
public void GetResourceData_DefaultDir_ReturnResourceData()
{
var testData = new ResourceDataReader(GetType());
var data = testData.ReadData("DefaultDataFile.txt");
data.Trim().Should().Be("DefaultDataFile");
}
[Test]
public void GetResourceData_NonexistentFile_Throw()
{
var testData = new ResourceDataReader(GetType());
Action act = () => testData.ReadData("DataFileWontBeFound.txt");
act.Should()
.Throw<ArgumentException>()
.WithMessage("Embedded resource not found*");
}
[Test]
public void ReadData_ExplicitSubDir_ReturnResourceData()
{
var testData = new ResourceDataReader(GetType(), "TestData");
var data = testData.ReadData("DataFile.txt");
data.Trim().Should().Be("DataFile");
}
}