コード例 #1
0
        public void Constructor_WithNonNullField_FieldPropertyShouldHaveTheSameValue()
        {
            var field = "type";
            var ex    = new TransactionFieldException(field);

            Assert.Equal(field, ex.Field);
        }
コード例 #2
0
        public void Constructor_WithMessage_MessagePropertyShouldHaveTheSameValue()
        {
            var field = "type";
            var msg   = "qwerty";
            var ex    = new TransactionFieldException(field, msg);

            Assert.Equal(field, ex.Field);
            Assert.Equal(msg, ex.Message);
        }
コード例 #3
0
        public void Constructor_WithInner_InnerExceptionPropertyShouldHaveTheSameValue()
        {
            var field = "type";
            var msg   = "qwerty";
            var inner = new Exception();
            var ex    = new TransactionFieldException(field, msg, inner);

            Assert.Equal(field, ex.Field);
            Assert.Equal(msg, ex.Message);
            Assert.Same(inner, ex.InnerException);
        }