Use conditional operator instead of if/else block
This commit is contained in:
parent
b8d52dafa9
commit
572600b38e
|
@ -56,26 +56,15 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers
|
||||||
.Returns(new UserItemData());
|
.Returns(new UserItemData());
|
||||||
|
|
||||||
var directoryService = new Mock<IDirectoryService>();
|
var directoryService = new Mock<IDirectoryService>();
|
||||||
if (MediaBrowser.Common.System.OperatingSystem.Id != OperatingSystemId.Windows)
|
_localImageFileMetadata = new FileSystemMetadata()
|
||||||
{
|
{
|
||||||
_localImageFileMetadata = new FileSystemMetadata()
|
Exists = true,
|
||||||
{
|
FullName = MediaBrowser.Common.System.OperatingSystem.Id == OperatingSystemId.Windows ?
|
||||||
Exists = true,
|
"C:\\media\\movies\\Justice League (2017).jpg"
|
||||||
FullName = "/media/movies/Justice League (2017).jpg"
|
: "/media/movies/Justice League (2017).jpg"
|
||||||
};
|
};
|
||||||
directoryService.Setup(x => x.GetFile(_localImageFileMetadata.FullName))
|
directoryService.Setup(x => x.GetFile(_localImageFileMetadata.FullName))
|
||||||
.Returns(_localImageFileMetadata);
|
.Returns(_localImageFileMetadata);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_localImageFileMetadata = new FileSystemMetadata()
|
|
||||||
{
|
|
||||||
Exists = true,
|
|
||||||
FullName = "C:\\media\\movies\\Justice League (2017).jpg"
|
|
||||||
};
|
|
||||||
directoryService.Setup(x => x.GetFile(_localImageFileMetadata.FullName))
|
|
||||||
.Returns(_localImageFileMetadata);
|
|
||||||
}
|
|
||||||
|
|
||||||
_userDataManager = userData.Object;
|
_userDataManager = userData.Object;
|
||||||
_parser = new MovieNfoParser(
|
_parser = new MovieNfoParser(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user