File size: 1,100 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
using VersOne.Epub.Schema;

namespace VersOne.Epub.Test.Unit.Schema.Ops.Narration
{
    public class SmilTextTests
    {
        private const string ID = "id";
        private const string SRC = "chapter.html";

        [Fact(DisplayName = "Constructing a SmilText instance with non-null parameters should succeed")]
        public void ConstructorWithNonNullParametersTest()
        {
            SmilText smilText = new(ID, SRC);
            Assert.Equal(ID, smilText.Id);
            Assert.Equal(SRC, smilText.Src);
        }

        [Fact(DisplayName = "Constructing a SmilText instance with null id parameter should succeed")]
        public void ConstructorWithNullIdTest()
        {
            SmilText smilText = new(null, SRC);
            Assert.Null(smilText.Id);
            Assert.Equal(SRC, smilText.Src);
        }

        [Fact(DisplayName = "Constructor should throw ArgumentNullException if src parameter is null")]
        public void ConstructorWithNullSrcTest()
        {
            Assert.Throws<ArgumentNullException>(() => new SmilText(ID, null!));
        }
    }
}