File size: 1,261 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 |
using VersOne.Epub.Schema;
namespace VersOne.Epub.Test.Unit.Schema.Opf.Metadata
{
public class EpubMetadataLinkPropertyTests
{
[Fact(DisplayName = "Converting a string to EpubMetadataLinkProperty list should succeed")]
public void ParsePropertyListTest()
{
string stringValue = "onix test-unknown-property";
List<EpubMetadataLinkProperty> expectedPropertyList = new()
{
EpubMetadataLinkProperty.ONIX,
EpubMetadataLinkProperty.UNKNOWN
};
List<EpubMetadataLinkProperty> actualPropertyList = EpubMetadataLinkPropertyParser.ParsePropertyList(stringValue);
Assert.Equal(expectedPropertyList, actualPropertyList);
}
[Fact(DisplayName = "Converting an empty string to EpubMetadataLinkProperty list should succeed")]
public void ParsePropertyListFromEmptyStringTest()
{
string stringValue = " ";
List<EpubMetadataLinkProperty> expectedPropertyList = new();
List<EpubMetadataLinkProperty> actualPropertyList = EpubMetadataLinkPropertyParser.ParsePropertyList(stringValue);
Assert.Equal(expectedPropertyList, actualPropertyList);
}
}
}
|