示例#1
0
        public void Path_NormalizePathSharpFail()
        {
            string result       = null;
            bool   gotException = false;

            try
            {
                result = SvnTools.GetNormalizedFullPath("c:\\<>\\..\\123456789012345678901234567890123456789012345678901234567890" +
                                                        "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" +
                                                        "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" +
                                                        "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" +
                                                        "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" +
                                                        "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890");
            }
            catch (ArgumentException)
            {
                Assert.That(Environment.Version.Major, Is.LessThan(4));
                gotException = true;
            }

            if (Environment.Version.Major >= 4 || IsCore())
            {
                Assert.That(result, Is.Not.Null);
            }
            else
            {
                Assert.That(gotException, "Got exception");
            }
        }
示例#2
0
 public void AssertAll_WithFailures()
 {
     Assert.Throws <AssertionException>(
         () =>
         AssertAll.Of(
             5,
             Is.EqualTo(9),
             Is.LessThan(double.PositiveInfinity),
             Is.InstanceOf(typeof(DayOfWeek))
             )
         );
 }
 public static void Less(uint arg1, uint arg2, string message, params object[] args)
 {
     Assert.That(arg1, Is.LessThan(arg2), message, args);
 }
 /// <summary>
 /// Verifies that the first value is less than the second
 /// value. If it is not, then an
 /// <see cref="AssertionException"/> is thrown.
 /// </summary>
 /// <param name="arg1">The first value, expected to be less</param>
 /// <param name="arg2">The second value, expected to be greater</param>
 public static void Less(int arg1, int arg2)
 {
     Assert.That(arg1, Is.LessThan(arg2), null, null);
 }
示例#5
0
 /// <summary>
 /// Verifies that the first value is less than the second
 /// value. If it is not, then an
 /// <see cref="AssertionException"/> is thrown.
 /// </summary>
 /// <param name="arg1">The first value, expected to be less</param>
 /// <param name="arg2">The second value, expected to be greater</param>
 public static void Less(IComparable arg1, IComparable arg2)
 {
     Assert.That(arg1, Is.LessThan(arg2), null, null);
 }
示例#6
0
 /// <summary>
 /// Verifies that the first value is less than the second
 /// value. If it is not, then an
 /// <see cref="AssertionException"/> is thrown.
 /// </summary>
 /// <param name="arg1">The first value, expected to be less</param>
 /// <param name="arg2">The second value, expected to be greater</param>
 public static void Less(double arg1, double arg2)
 {
     Assert.That(arg1, Is.LessThan(arg2), null, null);
 }
示例#7
0
 /// <summary>
 /// Verifies that the first value is less than the second
 /// value. If it is not, then an
 /// <see cref="AssertionException"/> is thrown.
 /// </summary>
 /// <param name="arg1">The first value, expected to be less</param>
 /// <param name="arg2">The second value, expected to be greater</param>
 public static void Less(decimal arg1, decimal arg2)
 {
     Assert.That(arg1, Is.LessThan(arg2), null, null);
 }
示例#8
0
 public static void Less(ulong arg1, ulong arg2)
 {
     Assert.That(arg1, Is.LessThan(arg2), null, null);
 }
示例#9
0
 public static void Less(double expected, double actual)
 {
     Assert.That(expected, Is.LessThan(actual));
 }
示例#10
0
 public static void Less(double expected, double actual, string message)
 {
     Assert.That(expected, Is.LessThan(actual), message, null);
 }
示例#11
0
 public static void Less(double expected, double actual, string message, params object[] args)
 {
     Assert.That(expected, Is.LessThan(actual), message, args);
 }
示例#12
0
 public static void Less(int expected, int actual)
 {
     Assert.That(expected, Is.LessThan(actual));
 }