Beispiel #1
0
        private static void AssertStringReader(UnpackingStreamReader target, int byteLength, string expected)
        {
            Assert.That(target, Is.Not.Null);
            Assert.That(target.ByteLength, Is.EqualTo(byteLength));

            for (int i = 0; i < expected.Length; i++)
            {
                int c = target.Read();
                Assert.That(c, Is.GreaterThanOrEqualTo(0));
                Assert.That(( char )c, Is.EqualTo(expected[i]));
            }

            Assert.That(target.EndOfStream, Is.True);
            Assert.That(target.Read(), Is.EqualTo(-1));
        }
 /// <summary>
 /// Verifies that the first value is greater than or equal to the second
 /// value. If it is not, then an
 /// <see cref="AssertionException"/> is thrown.
 /// </summary>
 /// <param name="arg1">The first value, expected to be greater</param>
 /// <param name="arg2">The second value, expected to be less</param>
 public static void GreaterOrEqual(IComparable arg1, IComparable arg2)
 {
     Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), null, null);
 }
 public static void should_be_greater_than_or_equal_to(this IComparable actual, IComparable baseline)
 {
     Assert.That(actual, Is.GreaterThanOrEqualTo(baseline));
 }
 /// <summary>
 /// Verifies that the first value is greater than or equal to the second
 /// value. If it is not, then an
 /// <see cref="AssertionException"/> is thrown.
 /// </summary>
 /// <param name="arg1">The first value, expected to be greater</param>
 /// <param name="arg2">The second value, expected to be less</param>
 /// <param name="message">The message to display in case of failure</param>
 /// <param name="args">Array of objects to be used in formatting the message</param>
 public static void GreaterOrEqual(IComparable arg1, IComparable arg2, string message, params object[] args)
 {
     Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), message, args);
 }
 /// <summary>
 /// Verifies that the first value is greater than or equal to the second
 /// value. If it is not, then an
 /// <see cref="AssertionException"/> is thrown.
 /// </summary>
 /// <param name="arg1">The first value, expected to be greater</param>
 /// <param name="arg2">The second value, expected to be less</param>
 public static void GreaterOrEqual(float arg1, float arg2)
 {
     Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), null, null);
 }
 /// <summary>
 /// Verifies that the first value is greater than or equal to the second
 /// value. If it is not, then an
 /// <see cref="AssertionException"/> is thrown.
 /// </summary>
 /// <param name="arg1">The first value, expected to be greater</param>
 /// <param name="arg2">The second value, expected to be less</param>
 public static void GreaterOrEqual(decimal arg1, decimal arg2)
 {
     Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), null, null);
 }
Beispiel #7
0
 public static void GreaterOrEqual(System.TimeSpan arg1, System.TimeSpan arg2, string message = null, params object[] args)
 {
     Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), message, args);
 }
Beispiel #8
0
 public static void GreaterOrEqual(uint arg1, uint arg2, string message)
 {
     Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), message, null);
 }