28 lines
798 B
C#
28 lines
798 B
C#
using LCU.Api.Internal.FileOperations.Services;
|
|
using System;
|
|
using Xunit;
|
|
|
|
namespace LCU.Api.Internal.FileOperationsTests.Services
|
|
{
|
|
public class DirectFileServiceTest
|
|
{
|
|
private readonly DirectFileService _directFileService;
|
|
|
|
public DirectFileServiceTest()
|
|
{
|
|
_directFileService = new DirectFileService();
|
|
}
|
|
|
|
[Fact]
|
|
public void Sir_Throws_A_Lot()
|
|
{
|
|
Assert.Throws<ArgumentException>(
|
|
() => { _directFileService.GetFileBytes(" "); });
|
|
Assert.Throws<ArgumentException>(
|
|
() => { _directFileService.GetFileBytes("C:\\secret.txt"); });
|
|
Assert.Throws<ArgumentException>(
|
|
() => { _directFileService.GetFileBytes("asdf"); });
|
|
}
|
|
}
|
|
}
|