public void TestExceptionWithInvalidPattern() { const string expectedErrorMessage = "FATAL - Puffix.Exceptions : Message is not valid and can not be formatted. Exception type: Tests.Puffix.Exceptions.Samples.Sample.InvalidPatternException. Pattern: The provided value ('{0') is not valid.."; var error = new InvalidPatternException(); Assert.NotNull(error); Assert.Equal(expectedErrorMessage, error.Message); }
public void InvalidPatternExceptionParameterlessConstructor() { var exception = new InvalidPatternException(); Assert.AreEqual(new FormatException().Message, exception.Message); }