File size: 1,580 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
namespace VersOne.Epub.Test.Unit.Exceptions
{
    public class EpubSmilExceptionTests
    {
        private const string TEST_SMIL_FILE_PATH = "Content/file.smil";
        private const string TEST_MESSAGE = "test message";

        [Fact(DisplayName = "Creating EpubSmilException with SMIL file path should succeed")]
        public void CreateWithContentFilePathTest()
        {
            EpubSmilException epubSmilException = new(TEST_SMIL_FILE_PATH);
            Assert.Equal(TEST_SMIL_FILE_PATH, epubSmilException.SmilFilePath);
        }

        [Fact(DisplayName = "Creating EpubSmilException with message and SMIL file path should succeed")]
        public void CreateWithMessageAndContentFilePathTest()
        {
            EpubSmilException epubSmilException = new(TEST_MESSAGE, TEST_SMIL_FILE_PATH);
            Assert.Equal(TEST_MESSAGE, epubSmilException.Message);
            Assert.Equal(TEST_SMIL_FILE_PATH, epubSmilException.SmilFilePath);
        }

        [Fact(DisplayName = "Creating EpubSmilException with message, inner exception, and SMIL file path should succeed")]
        public void CreateWithMessageAndInnerExceptionAndContentFilePathTest()
        {
            Exception innerException = new();
            EpubSmilException epubSmilException = new(TEST_MESSAGE, innerException, TEST_SMIL_FILE_PATH);
            Assert.Equal(TEST_MESSAGE, epubSmilException.Message);
            Assert.Equal(innerException, epubSmilException.InnerException);
            Assert.Equal(TEST_SMIL_FILE_PATH, epubSmilException.SmilFilePath);
        }
    }
}