public void Serializable() { var ex = new AuthorizationException("Test", new ScorpioException("InnerException")); var formatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); var stream = new MemoryStream(); formatter.Serialize(stream, ex); stream.Seek(0, SeekOrigin.Begin); var act = formatter.Deserialize(stream); act.ShouldBeOfType <AuthorizationException>().InnerException.ShouldBeOfType <ScorpioException>().Message.ShouldBe("InnerException"); }
public void InnerException() { var ex = new AuthorizationException("Test", new ScorpioException("InnerException")); ex.InnerException.ShouldBeOfType <ScorpioException>().Message.ShouldBe("InnerException"); }
public void LogLevel() { var ex = new AuthorizationException(); ex.LogLevel.ShouldBe(Microsoft.Extensions.Logging.LogLevel.Warning); }