mirror of
https://github.com/SabreTools/MPF.git
synced 2026-02-18 21:39:56 +00:00
* Professional cook * Accuracy improvements * Better yet * Spicy * Simplify and reduce * You eye note * More info for validation * Read you * Verbose * Typo * Custom fix * Of note * Clearly the same * Creator update * Creator MCN flag gone * Missed a spot * Fix issues after code walkthrough
47 lines
1.4 KiB
C#
47 lines
1.4 KiB
C#
using DICUI.Data;
|
|
using DICUI.Utilities;
|
|
using Xunit;
|
|
|
|
namespace DICUI.Test.Utilities
|
|
{
|
|
public class MediaTypeExtensionsTest
|
|
{
|
|
[Theory]
|
|
[InlineData(MediaType.CDROM, "CD-ROM")]
|
|
[InlineData(MediaType.LaserDisc, "LD-ROM / LV-ROM")]
|
|
[InlineData(MediaType.NONE, "Unknown")]
|
|
public void NameTest(MediaType? mediaType, string expected)
|
|
{
|
|
string actual = mediaType.LongName();
|
|
|
|
Assert.NotNull(actual);
|
|
Assert.Equal(expected, actual);
|
|
}
|
|
|
|
[Theory]
|
|
[InlineData(MediaType.CDROM, ".bin")]
|
|
[InlineData(MediaType.DVD, ".iso")]
|
|
[InlineData(MediaType.LaserDisc, ".raw")]
|
|
[InlineData(MediaType.FloppyDisk, ".img")]
|
|
[InlineData(MediaType.NONE, null)]
|
|
public void ExtensionTest(MediaType? mediaType, string expected)
|
|
{
|
|
string actual = mediaType.Extension(false);
|
|
|
|
Assert.Equal(expected, actual);
|
|
}
|
|
|
|
[Theory]
|
|
[InlineData(MediaType.CDROM, true)]
|
|
[InlineData(MediaType.DVD, true)]
|
|
[InlineData(MediaType.FloppyDisk, false)]
|
|
[InlineData(MediaType.BluRay, true)]
|
|
[InlineData(MediaType.LaserDisc, false)]
|
|
public void DriveSpeedSupportedTest(MediaType? mediaType, bool expected)
|
|
{
|
|
bool actual = mediaType.DoesSupportDriveSpeed();
|
|
Assert.Equal(expected, actual);
|
|
}
|
|
}
|
|
}
|