Пример #1
0
        public void IsNotEmptyShouldNotRaiseExceptionIfNotEmpty()
        {
            Guid foo    = Guid.NewGuid();
            var  result = AssertArg.IsNotEmpty(foo, nameof(foo));

            Assert.AreEqual(foo, result);
        }
Пример #2
0
        public void IsLessThanOrEqualIntShouldNotRaiseExceptionIfEqual()
        {
            var foo    = 5;
            var result = AssertArg.IsLessThanOrEqual(5, foo, nameof(foo));

            Assert.AreEqual(foo, result);
        }
Пример #3
0
        public void IsLessThanOrEqualDoubleShouldNotRaiseExceptionIfLessThanOrEqual()
        {
            var foo    = 5.0;
            var result = AssertArg.IsLessThanOrEqual(6.0, foo, nameof(foo));

            Assert.AreEqual(foo, result);
        }
Пример #4
0
        public void IsNotNullAndOfTypeShouldNotRaiseExceptionIfNotNull()
        {
            object foo    = new object();
            var    result = AssertArg.IsNotNullAndOfType <object>(foo, nameof(foo));

            Assert.AreEqual(foo, result);
        }
Пример #5
0
        public void IsGreaterThanOrEqualIntShouldNotRaiseExceptionIfGreaterThan()
        {
            var foo    = 5;
            var result = AssertArg.IsGreaterThanOrEqual(1, foo, nameof(foo));

            Assert.AreEqual(foo, result);
        }
Пример #6
0
        public void IsNotNullOrEmptyShouldNotRaiseExceptionIfNotNullOrEmpty()
        {
            string foo    = "foo";
            var    result = AssertArg.IsNotNullOrEmpty(foo, nameof(foo));

            Assert.AreEqual(foo, result);
        }
Пример #7
0
        public void IsNotNullOrWhiteSpaceShouldRaiseExceptionIfWhiteSpace()
        {
            string foo = "  ";

            AssertArg.IsNotNullOrWhiteSpace(foo, nameof(foo));

            string foo2 = "";

            AssertArg.IsNotNullOrWhiteSpace(foo, nameof(foo2));
        }
Пример #8
0
        public void IsNotNullOrEmptyShouldRaiseExceptionIfEmpty()
        {
            string foo = string.Empty;

            AssertArg.IsNotNullOrEmpty(foo, nameof(foo));
        }
Пример #9
0
        public void IsNotNullShouldRaiseExceptionIfNull()
        {
            object foo = null;

            AssertArg.IsNotNull(foo, nameof(IsNotNullShouldRaiseExceptionIfNull));
        }
Пример #10
0
        public void IsNotNullAndOfTypeShouldRaiseExceptionIfNotOfType()
        {
            object foo = new object();

            AssertArg.IsNotNullAndOfType <string>(foo, nameof(foo));
        }
Пример #11
0
 public void IsGreaterIntThanShouldRaiseExceptionIfLessThan()
 {
     AssertArg.IsGreaterThan(1, 0, "None");
 }
Пример #12
0
 public void IsGreaterIntThanShouldRaiseExceptionIfEqual()
 {
     AssertArg.IsGreaterThan(1, 1, "None");
 }
Пример #13
0
        public void IsNotNullAndOfTypeShouldRaiseExceptionIfNull()
        {
            object foo = null;

            AssertArg.IsNotNullAndOfType <object>(foo, nameof(foo));
        }
Пример #14
0
 public void IsGreaterDoubleThanShouldRaiseExceptionIfEqual()
 {
     AssertArg.IsGreaterThan(1.0, 1.0, "None");
 }
Пример #15
0
 public void IsLessThanOrEqualDoubleShouldRaiseExceptionIfNotLessThan()
 {
     AssertArg.IsLessThan(0.0, 1.0, "None");
 }
Пример #16
0
 public void IsGreaterThanOrEqualIntShouldRaiseExceptionIfLessThan()
 {
     AssertArg.IsGreaterThanOrEqual(1, 0, "None");
 }
Пример #17
0
        public void IsNotNullOrWhiteSpaceShouldRaiseExceptionIfNull()
        {
            string foo = null;

            AssertArg.IsNotNullOrWhiteSpace(foo, nameof(foo));
        }
Пример #18
0
 public void IsLessThanDoubleShouldRaiseExceptionIfEqual()
 {
     AssertArg.IsLessThan(1.0, 1.0, "None");
 }
Пример #19
0
 public void IsLessThanIntShouldRaiseExceptionIfEqual()
 {
     AssertArg.IsLessThan(1, 1, "None");
 }
Пример #20
0
 public void IsGreaterThanOrEqualDoubleShouldRaiseExceptionIfLessThan()
 {
     AssertArg.IsGreaterThanOrEqual(1.0, 0.0, "None");
 }
Пример #21
0
 public void IsLessThanOrEqualIntShouldRaiseExceptionIfNotLessThan()
 {
     AssertArg.IsLessThan(0, 1, "None");
 }
Пример #22
0
        public void IsNotEmptyShouldRaiseExceptionIfEmpty()
        {
            Guid foo = Guid.Empty;

            AssertArg.IsNotEmpty(foo, nameof(foo));
        }