Java Assert assertComparison(T actual, T expected)

Here you can find the source of assertComparison(T actual, T expected)

Description

assert Comparison

License

Apache License

Declaration

public static <T extends Comparable<T>> boolean assertComparison(T actual, T expected) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static <T extends Comparable<T>> boolean assertComparison(T actual, T expected) {
        boolean ret = false;
        if ((expected == null) && (actual == null)) {
            ret = true;/* w  w w  .  ja va2 s. c om*/
        } else if (expected != null) {
            ret = expected.compareTo(actual) == 0;
        }
        return ret;
    }
}

Related

  1. assertCharactersNotInString(final String illegalChars, final char... chars)
  2. assertCheckStrAndQuery(String str, String query)
  3. assertClassDoesNotExist(String className)
  4. assertClassExists(String className)
  5. assertColor(int color)
  6. assertComparison(T actual, T expected)
  7. assertCond(boolean b)
  8. assertCondition(boolean condition, String message)
  9. assertCondition(boolean condition, String msg)