File size: 2,383 Bytes
fab29d7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
using VersOne.Epub.Options;
namespace VersOne.Epub.Test.Unit.Options
{
public class BookCoverReaderOptionsTests
{
[Fact(DisplayName = "Constructing a BookCoverReaderOptions instance with a non-null preset parameter should succeed")]
public void ConstructorWithNonNullPresetTest()
{
_ = new BookCoverReaderOptions(EpubReaderOptionsPreset.RELAXED);
}
[Fact(DisplayName = "Constructing a BookCoverReaderOptions instance with a null preset parameter should succeed")]
public void ConstructorWithNullPresetTest()
{
_ = new BookCoverReaderOptions(null);
}
[Fact(DisplayName = "Constructing a BookCoverReaderOptions instance with a null preset parameter should initialize properties with the expected values.")]
public void InitializationWithNullPresetTest()
{
BookCoverReaderOptions bookCoverReaderOptions = new(null);
Assert.False(bookCoverReaderOptions.Epub2MetadataIgnoreMissingManifestItem);
}
[Fact(DisplayName = "Constructing a BookCoverReaderOptions instance with the STRICT preset parameter should initialize properties with the expected values.")]
public void InitializationWithStrictPresetTest()
{
BookCoverReaderOptions bookCoverReaderOptions = new(EpubReaderOptionsPreset.STRICT);
Assert.False(bookCoverReaderOptions.Epub2MetadataIgnoreMissingManifestItem);
}
[Fact(DisplayName = "Constructing a BookCoverReaderOptions instance with the RELAXED preset parameter should initialize properties with the expected values.")]
public void InitializationWithRelaxedPresetTest()
{
BookCoverReaderOptions bookCoverReaderOptions = new(EpubReaderOptionsPreset.RELAXED);
Assert.True(bookCoverReaderOptions.Epub2MetadataIgnoreMissingManifestItem);
}
[Fact(DisplayName = "Constructing a BookCoverReaderOptions instance with the IGNORE_ALL_ERRORS preset parameter should initialize properties with the expected values.")]
public void InitializationWithIgnoreAllErrorsPresetTest()
{
BookCoverReaderOptions bookCoverReaderOptions = new(EpubReaderOptionsPreset.IGNORE_ALL_ERRORS);
Assert.True(bookCoverReaderOptions.Epub2MetadataIgnoreMissingManifestItem);
}
}
}
|