File size: 1,429 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 |
namespace VersOne.Epub.Test.Unit.Exceptions
{
public class Epub3NavExceptionTests
{
private const string TEST_MESSAGE = "test message";
[Fact(DisplayName = "Creating Epub3NavException without arguments should succeed")]
public void CreateWithNoArgumentsTest()
{
Epub3NavException epub3NavException = new();
Assert.Equal(EpubSchemaFileType.EPUB3_NAV_DOCUMENT, epub3NavException.SchemaFileType);
}
[Fact(DisplayName = "Creating Epub3NavException with message should succeed")]
public void CreateWithMessageTest()
{
Epub3NavException epub3NavException = new(TEST_MESSAGE);
Assert.Equal(EpubSchemaFileType.EPUB3_NAV_DOCUMENT, epub3NavException.SchemaFileType);
Assert.Equal(TEST_MESSAGE, epub3NavException.Message);
}
[Fact(DisplayName = "Creating Epub3NavException with message and inner exception should succeed")]
public void CreateWithMessageAndInnerExceptionTest()
{
Exception innerException = new();
Epub3NavException epub3NavException = new(TEST_MESSAGE, innerException);
Assert.Equal(EpubSchemaFileType.EPUB3_NAV_DOCUMENT, epub3NavException.SchemaFileType);
Assert.Equal(TEST_MESSAGE, epub3NavException.Message);
Assert.Equal(innerException, epub3NavException.InnerException);
}
}
}
|