Пример #1
0
        public void Is_WithMessage_ConditionIsNull()
        {
            var target = new ArgumentConstraint <int>(new Argument <int>("Test", 10));

            Action work = () => target.Is(null, "Testing {0} {1}", 1, 2);

            work.ShouldThrowArgumentNullException();
        }
Пример #2
0
        public void Is_WithMessage_IsFalse()
        {
            var target = new ArgumentConstraint <int>(new Argument <int>("Test", 10));

            Action work = () => target.Is(x => x < 0, "Testing {0} {1}", 1, 2);

            work.ShouldThrowArgumentException();
        }
Пример #3
0
        public void Is_ConditionIsNull()
        {
            var target = new ArgumentConstraint <int>(new Argument <int>("Test", 10));

            Action work = () => target.Is(null);

            work.ShouldThrowArgumentNullException();
        }
Пример #4
0
        public void Is_IsFalse()
        {
            var target = new ArgumentConstraint <int>(new Argument <int>("Test", 10));

            Action work = () => target.Is(x => x < 0);

            work.ShouldThrowArgumentException();
        }
Пример #5
0
        public void Is_WithMessage_IsTrue()
        {
            var target = new ArgumentConstraint <int>(new Argument <int>("Test", 10));

            target.Is(x => x > 0, "Testing {0} {1}", 1, 2);
        }
Пример #6
0
        public void Is_IsTrue()
        {
            var target = new ArgumentConstraint <int>(new Argument <int>("Test", 10));

            target.Is(x => x > 0);
        }