Exemplo n.º 1
0
 internal void IsEquals(string message, long a, long b)
 {
     if (a != b)
     {
         throw new TestFailedException(SimpleTestResult.Failed(this, message));
     }
 }
Exemplo n.º 2
0
 internal void Fail(
     string message,
     object expected,
     object found)
 {
     throw new TestFailedException(SimpleTestResult.Failed(this, message, expected, found));
 }
Exemplo n.º 3
0
 internal void IsEquals(int a, int b)
 {
     if (a != b)
     {
         throw new TestFailedException(SimpleTestResult.Failed(this, "no message"));
     }
 }
Exemplo n.º 4
0
 internal void IsEquals(object a, object b)
 {
     if (!a.Equals(b))
     {
         throw new TestFailedException(SimpleTestResult.Failed(this, "no message"));
     }
 }
Exemplo n.º 5
0
 internal void IsTrue(string message, bool value)
 {
     if (!value)
     {
         throw new TestFailedException(SimpleTestResult.Failed(this, message));
     }
 }
Exemplo n.º 6
0
 internal void IsTrue(bool value)
 {
     if (!value)
     {
         throw new TestFailedException(SimpleTestResult.Failed(this, "no message"));
     }
 }
Exemplo n.º 7
0
        public virtual ITestResult Perform()
        {
            try
            {
                PerformTest();

                return(Success());
            }
            catch (TestFailedException e)
            {
                return(e.GetResult());
            }
            catch (Exception e)
            {
                return(SimpleTestResult.Failed(this, "Exception: " + e, e));
            }
        }
Exemplo n.º 8
0
        internal void IsEquals(string message, object a, object b)
        {
            if (a == null && b == null)
            {
                return;
            }

            if (a == null)
            {
                throw new TestFailedException(SimpleTestResult.Failed(this, message));
            }
            if (b == null)
            {
                throw new TestFailedException(SimpleTestResult.Failed(this, message));
            }
            if (!a.Equals(b))
            {
                throw new TestFailedException(SimpleTestResult.Failed(this, message));
            }
        }
Exemplo n.º 9
0
 internal void Fail(
     string message,
     Exception throwable)
 {
     throw new TestFailedException(SimpleTestResult.Failed(this, message, throwable));
 }
Exemplo n.º 10
0
 private ITestResult Success()
 {
     return(SimpleTestResult.Successful(this, "Okay"));
 }