Package com.vividsolutions.jts.util

Examples of com.vividsolutions.jts.util.AssertionFailedException


   *@throws  AssertionFailedException  if the condition is false
   */
  public static void isTrue(boolean assertion, String message) {
    if (!assertion) {
      if (message == null) {
        throw new AssertionFailedException();
      }
      else {
        throw new AssertionFailedException(message);
      }
    }
  }
View Full Code Here


   *@param  message                    a description of the assertion
   *@throws  AssertionFailedException  if the two objects are not equal
   */
  public static void equals(Object expectedValue, Object actualValue, String message) {
    if (!actualValue.equals(expectedValue)) {
      throw new AssertionFailedException("Expected " + expectedValue + " but encountered "
           + actualValue + (message != null ? ": " + message : ""));
    }
  }
View Full Code Here

   *
   *@param  message                    a description of the assertion
   *@throws  AssertionFailedException  thrown always
   */
  public static void shouldNeverReachHere(String message) {
    throw new AssertionFailedException("Should never reach here"
         + (message != null ? ": " + message : ""));
  }
View Full Code Here

                }
                if (VALUE_OBJ_FIELD_NON_RECURSIVE_TYPE.contains(type) || isJavaType(type)) {
                    continue;
                }
                if (VALUE_OBJ_FIELD_TYPE_THAT_SHOULD_BE_P_TYPE.contains(type)) {
                    throw new AssertionFailedException(typeToTest.getName() + "#" + attribute.getName() + " should not be a field in a" +
                                                       " value object.  Instead use the more general " + PArray.class.getName() + " or " +
                                                       PObject.class.getName());
                }
                tested.add(type);
                validateParamObject(type, tested);
View Full Code Here

                        append("parameters have the correct type.\n\n").
                        append(wrongType);
            }

            if (finalError.length() > 0) {
                throw new AssertionFailedException(finalError.toString());
            }

        }
    }
View Full Code Here

                    append("parameters have the correct type.\n\n").
                    append(wrongType);
        }

        if (finalError.length() > 0) {
            throw new AssertionFailedException(finalError.toString());
        }
    }
View Full Code Here

TOP

Related Classes of com.vividsolutions.jts.util.AssertionFailedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.