feat: working on adding abstractions
This commit is contained in:
@@ -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>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user