Ejemplo n.º 1
0
 public void IsLessThan(T check)
 {
     if (!MakeSure.Less((IComparable)Value, (IComparable)check))
     {
         throw new AssertFailedException(check, Value, "IsLessThan");
     }
 }
Ejemplo n.º 2
0
 public void IsNot(T check)
 {
     if (MakeSure.Equal(check, Value))
     {
         throw new AssertFailedException(check, Value, "IsNot");
     }
 }
Ejemplo n.º 3
0
        public void DoesNotThrow()
        {
            const bool expected = true;
            var        actual   = false;

            try
            {
                Value();
                actual = true;
            }
            catch { }

            if (!MakeSure.Equal(expected, actual))
            {
                throw new AssertFailedException(expected, actual, "DoesNotThrow");
            }
        }
Ejemplo n.º 4
0
        public void Throws <T>()
        {
            const bool expected = true;

            var actual = false;

            try
            {
                Value();
            }
            catch (Exception ex)
            {
                actual = ex.GetType() == typeof(T);
            }

            if (!MakeSure.Equal(expected, actual))
            {
                throw new AssertFailedException(expected, actual, "Throws");
            }
        }