Fixed: Avoid zero-length array memory allocations

This commit is contained in:
Qstick
2020-10-02 14:29:25 -04:00
parent 295b975046
commit 4ec71538b9
34 changed files with 64 additions and 55 deletions

View File

@@ -1,3 +1,4 @@
using System;
using System.IO;
using FluentAssertions;
using Moq;
@@ -44,7 +45,7 @@ namespace NzbDrone.Mono.Test.EnvironmentInfo.VersionAdapters
Subject.Read().Should().BeNull();
Mocker.GetMock<IDiskProvider>()
.Setup(c => c.GetFiles(It.IsAny<string>(), SearchOption.TopDirectoryOnly)).Returns(new string[0]);
.Setup(c => c.GetFiles(It.IsAny<string>(), SearchOption.TopDirectoryOnly)).Returns(Array.Empty<string>());
Subject.Read().Should().BeNull();
}