LediReader
/
EpubReader
/Source
/VersOne.Epub.Test
/Unit
/Schema
/Opf
/Metadata
/EpubMetadataSourceTests.cs
| using VersOne.Epub.Schema; | |
| namespace VersOne.Epub.Test.Unit.Schema.Opf.Metadata | |
| { | |
| public class EpubMetadataSourceTests | |
| { | |
| private const string SOURCE = "https://example.com/books/123/content.html"; | |
| private const string ID = "source"; | |
| [] | |
| public void ConstructorWithNonNullParametersTest() | |
| { | |
| EpubMetadataSource epubMetadataSource = new(SOURCE, ID); | |
| Assert.Equal(SOURCE, epubMetadataSource.Source); | |
| Assert.Equal(ID, epubMetadataSource.Id); | |
| } | |
| [] | |
| public void ConstructorWithNullContributorTest() | |
| { | |
| Assert.Throws<ArgumentNullException>(() => new EpubMetadataSource(null!, ID)); | |
| } | |
| [] | |
| public void ConstructorWithNullIdTest() | |
| { | |
| EpubMetadataSource epubMetadataSource = new(SOURCE, null); | |
| Assert.Equal(SOURCE, epubMetadataSource.Source); | |
| Assert.Null(epubMetadataSource.Id); | |
| } | |
| } | |
| } | |