public void Test_Constructor_Exception() { var exception = new CurrencyMismatchException(new Exception("inner")); Assert.Equal(exception.Message, CurrencyMismatchException.DefaultMessage); Assert.Null(exception.LeftOperand); Assert.Null(exception.RightOperand); Assert.Equal(exception.InnerException.Message, "inner"); }
public void Test_Constructor_Parameterless() { var exception = new CurrencyMismatchException(); Assert.Equal(exception.Message, CurrencyMismatchException.DefaultMessage); Assert.Null(exception.LeftOperand); Assert.Null(exception.RightOperand); Assert.Null(exception.InnerException); }
public void Test_Constructor_String() { var exception = new CurrencyMismatchException("test"); Assert.Equal(exception.Message, "test"); Assert.Null(exception.LeftOperand); Assert.Null(exception.RightOperand); Assert.Null(exception.InnerException); }
public void Test_Constructor_Money_Money() { var exception = new CurrencyMismatchException( this.TenUSD, this.TenEUR ); Assert.Equal(exception.Message, CurrencyMismatchException.DefaultMessage); Assert.Equal(exception.LeftOperand, this.TenUSD); Assert.Equal(exception.RightOperand, this.TenEUR); Assert.Null(exception.InnerException); }
public void Test_Constructor_String_Money_Money_Exception() { var exception = new CurrencyMismatchException( "test", this.TenUSD, this.TenEUR, new Exception("inner") ); Assert.Equal(exception.Message, "test"); Assert.Equal(exception.LeftOperand, this.TenUSD); Assert.Equal(exception.RightOperand, this.TenEUR); Assert.Equal(exception.InnerException.Message, "inner"); }