feat: working on adding abstractions

This commit is contained in:
Stevan Freeborn
2025-02-09 23:22:21 -06:00
parent 651869c27f
commit baf4035616
34 changed files with 1122 additions and 37 deletions
@@ -0,0 +1,26 @@
namespace BGR.Console.Tests.Unit;
public class ResourceManagerTests
{
private readonly ResourceManager _resourceManager = new();
[Fact]
public void GetResource_WhenResourceExists_ItShouldReturnStream()
{
var resourceName = "u2net.onnx";
using var stream = _resourceManager.GetResource(resourceName);
stream.ShouldNotBeNull();
}
[Fact]
public void GetResource_WhenResourceDoesNotExist_ItShouldThrowException()
{
var resourceName = "nonexistent.onnx";
var act = () => _resourceManager.GetResource(resourceName);
act.ShouldThrow<FileNotFoundException>();
}
}